コード例 #1
0
        private static NSLayoutConstraint GetZeroConstraint(UIView view, NSLayoutAttribute attribute)
        {
            Tuple <NSLayoutConstraint, bool> result = FindOrCreateConstraint(view, attribute);

            NSLayoutConstraint constraint = result.Item1;
            bool didCreateConstraint      = result.Item2;

            constraint.Clear(didCreateConstraint);

            return(constraint);
        }
コード例 #2
0
        private static void ClearConstraint(UIView view, NSLayoutAttribute attribute)
        {
            NSLayoutConstraint constraint = GetConstraint(view, view.Superview, attribute);

            constraint?.Clear(false);
        }