/// <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)); }