public void Bounds() { var bounds = new CGRect(1, 2, 3, 4); var obj = new UIView { Bounds = bounds, }; Assert.AreEqual(bounds, obj.Bounds); }
public void Frame() { var frame = new CGRect(1, 2, 3, 4); var obj = new UIView { Frame = frame, }; Assert.AreEqual(frame, obj.Frame); }
public void PresentFromRect(CGRect rect, UIView view, UIPopoverArrowDirection arrowDirections, bool animated) { ObjC.MessageSend(Handle, "presentPopoverFromRect:inView:permittedArrowDirections:animated:", rect, view.Handle, (uint)arrowDirections, animated); }
public void NewObjectWithFrame() { var frame = new CGRect(0, 1, 2, 3); var obj = new AdBannerView(frame); Assert.AreNotEqual(CGRect.Empty, obj.Frame); }
public void NewObjectWithFrame() { var frame = new CGRect(1, 2, 3, 4); var obj = new UIWindow(frame); Assert.AreEqual(frame, obj.Frame); }
public static CGRect Intersect(CGRect a, CGRect b) { if (!a.IntersectsWithInclusive(b)) { return CGRect.Empty; } return CGRect.FromLTRB(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y), Math.Min(a.Right, b.Right), Math.Min(a.Bottom, b.Bottom)); }
public static CGRect Inflate(CGRect rect, float x, float y) { CGRect result = new CGRect(rect.X, rect.Y, rect.Width, rect.Height); result.Inflate(x, y); return result; }
private bool IntersectsWithInclusive(CGRect r) { return X <= r.Right && Right >= r.X && Y <= r.Bottom && Bottom >= r.Y; }
public bool IntersectsWith(CGRect rect) { return X < rect.Right && Right > rect.X && Y < rect.Bottom && Bottom > rect.Y; }
public void Intersect(CGRect rect) { this = CGRect.Intersect(this, rect); }
public bool Contains(CGRect rect) { return X <= rect.X && Right >= rect.Right && Y <= rect.Y && Bottom >= rect.Bottom; }
public static CGRect Union(CGRect a, CGRect b) { return CGRect.FromLTRB(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y), Math.Max(a.Right, b.Right), Math.Max(a.Bottom, b.Bottom)); }
public UIView(CGRect frame) { Handle = ObjC.MessageSendIntPtr(Handle, "initWithFrame:", frame); }
public AdBannerView(CGRect frame) : base(frame) { ObjC.MessageSend(Handle, "setDelegate:", Handle); }
public UIWindow(CGRect frame) : base(frame) { }