Upravit

Sdílet prostřednictvím


UIViewController.Add(UIView) Method

Definition

This is an alias for AddSubview(UIView), but uses the Add pattern as it allows C# 3.0 constructs to add subviews after creating the object.

public void Add (UIKit.UIView view);
member this.Add : UIKit.UIView -> unit

Parameters

view
UIView

The subview to add.

Remarks

This method is equivalent to calling AddSubview(UIView) on this UIViewController's View and is present to enable C# 3.0 to add subviews at creation time.

var myView = new MyViewController (new RectangleF (0, 0, 320, 320)){
  new ImageGallery (region [0]),
  new ImageGallery (region [1]),
  new UILabel (new RectangleF (10, 10, 200, 200)){
    Text = "Images from our Trip"
  }
};

Applies to