コード例 #1
0
ファイル: UIViewExtensions.cs プロジェクト: t9mike/Mitten
 /// <summary>
 /// Centers the view both vertically and horizontally to its parent.
 /// </summary>
 /// <param name="view">A view to center.</param>
 /// <returns>The NSLayoutConstraints for the anchor.</returns>
 public static NSLayoutConstraint[] AnchorCenter(this UIView view)
 {
     UIViewExtensions.EnsureHasParent(view);
     return(view.AnchorCenter(view.Superview));
 }