Пример #1
0
 public void Bounds()
 {
     var bounds = new CGRect(1, 2, 3, 4);
     var obj = new UIView
     {
         Bounds = bounds,
     };
     Assert.AreEqual(bounds, obj.Bounds);
 }
Пример #2
0
 public void Frame()
 {
     var frame = new CGRect(1, 2, 3, 4);
     var obj = new UIView
     {
         Frame = frame,
     };
     Assert.AreEqual(frame, obj.Frame);
 }
Пример #3
0
 public void PresentFromRect(CGRect rect, UIView view, UIPopoverArrowDirection arrowDirections, bool animated)
 {
     ObjC.MessageSend(Handle, "presentPopoverFromRect:inView:permittedArrowDirections:animated:", rect, view.Handle, (uint)arrowDirections, animated);
 }
Пример #4
0
 public void NewObjectWithFrame()
 {
     var frame = new CGRect(0, 1, 2, 3);
     var obj = new AdBannerView(frame);
     Assert.AreNotEqual(CGRect.Empty, obj.Frame);
 }
Пример #5
0
 public void NewObjectWithFrame()
 {
     var frame = new CGRect(1, 2, 3, 4);
     var obj = new UIWindow(frame);
     Assert.AreEqual(frame, obj.Frame);
 }
Пример #6
0
 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));
 }
Пример #7
0
 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;
 }
Пример #8
0
 private bool IntersectsWithInclusive(CGRect r)
 {
     return X <= r.Right && Right >= r.X && Y <= r.Bottom && Bottom >= r.Y;
 }
Пример #9
0
 public bool IntersectsWith(CGRect rect)
 {
     return X < rect.Right && Right > rect.X && Y < rect.Bottom && Bottom > rect.Y;
 }
Пример #10
0
 public void Intersect(CGRect rect)
 {
     this = CGRect.Intersect(this, rect);
 }
Пример #11
0
 public bool Contains(CGRect rect)
 {
     return X <= rect.X && Right >= rect.Right && Y <= rect.Y && Bottom >= rect.Bottom;
 }
Пример #12
0
 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));
 }
Пример #13
0
 public UIView(CGRect frame)
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "initWithFrame:", frame);
 }
Пример #14
0
 public AdBannerView(CGRect frame)
     : base(frame)
 {
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }
Пример #15
0
 public UIWindow(CGRect frame)
     : base(frame)
 {
 }