Package apple.uikit

Class NSLayoutConstraint

  • All Implemented Interfaces:
    NSObject

    public class NSLayoutConstraint
    extends NSObject
    • Constructor Detail

      • NSLayoutConstraint

        protected NSLayoutConstraint​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • activateConstraints

        public static void activateConstraints​(NSArray<? extends NSLayoutConstraint> constraints)
        Convenience method that activates each constraint in the contained array, in the same manner as setting active=YES. This is often more efficient than activating each constraint individually.
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • constraintWithItemAttributeRelatedByToItemAttributeMultiplierConstant

        public static NSLayoutConstraint constraintWithItemAttributeRelatedByToItemAttributeMultiplierConstant​(java.lang.Object view1,
                                                                                                               long attr1,
                                                                                                               long relation,
                                                                                                               java.lang.Object view2,
                                                                                                               long attr2,
                                                                                                               double multiplier,
                                                                                                               double c)
        Create constraints explicitly. Constraints are of the form "view1.attr1 = view2.attr2 * multiplier + constant" If your equation does not have a second view and attribute, use nil and NSLayoutAttributeNotAnAttribute. Use of this method is not recommended. Constraints should be created using anchor objects on views and layout guides.
      • constraintsWithVisualFormatOptionsMetricsViews

        public static NSArray<? extends NSLayoutConstraint> constraintsWithVisualFormatOptionsMetricsViews​(java.lang.String format,
                                                                                                           long opts,
                                                                                                           NSDictionary<java.lang.String,​?> metrics,
                                                                                                           NSDictionary<java.lang.String,​?> views)
        Create an array of constraints using an ASCII-art-like visual format string. The values of the `metrics` dictionary should be NSNumber (or some other type that responds to -doubleValue and returns a double).
      • deactivateConstraints

        public static void deactivateConstraints​(NSArray<? extends NSLayoutConstraint> constraints)
        Convenience method that deactivates each constraint in the contained array, in the same manner as setting active=NO. This is often more efficient than deactivating each constraint individually.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • constant

        public double constant()
        Unlike the other properties, the constant may be modified after constraint creation. Setting the constant on an existing constraint performs much better than removing the constraint and adding a new one that's just like the old but for having a new constant.
      • firstAnchor

        public NSLayoutAnchor<?> firstAnchor()
        accessors firstAnchor{==,<=,>=} secondAnchor * multiplier + constant
      • firstAttribute

        public long firstAttribute()
      • firstItem

        public java.lang.Object firstItem()
        accessors firstItem.firstAttribute {==,<=,>=} secondItem.secondAttribute * multiplier + constant Access to these properties is not recommended. Use the `firstAnchor` and `secondAnchor` properties instead.
      • identifier

        public java.lang.String identifier()
        For ease in debugging, name a constraint by setting its identifier, which will be printed in the constraint's description. Identifiers starting with NS or UI are reserved by the system.
      • isActive

        public boolean isActive()
        The receiver may be activated or deactivated by manipulating this property.  Only active constraints affect the calculated layout.  Attempting to activate a constraint whose items have no common ancestor will cause an exception to be thrown. Defaults to NO for newly created constraints.
      • setActive

        public void setActive​(boolean value)
        The receiver may be activated or deactivated by manipulating this property.  Only active constraints affect the calculated layout.  Attempting to activate a constraint whose items have no common ancestor will cause an exception to be thrown. Defaults to NO for newly created constraints.
      • multiplier

        public double multiplier()
      • priority

        public float priority()
      • relation

        public long relation()
      • secondAttribute

        public long secondAttribute()
      • secondItem

        public java.lang.Object secondItem()
      • setConstant

        public void setConstant​(double value)
        Unlike the other properties, the constant may be modified after constraint creation. Setting the constant on an existing constraint performs much better than removing the constraint and adding a new one that's just like the old but for having a new constant.
      • setIdentifier

        public void setIdentifier​(java.lang.String value)
        For ease in debugging, name a constraint by setting its identifier, which will be printed in the constraint's description. Identifiers starting with NS or UI are reserved by the system.
      • setPriority

        public void setPriority​(float value)
      • setShouldBeArchived

        public void setShouldBeArchived​(boolean value)
        When a view is archived, it archives some but not all constraints in its -constraints array. The value of shouldBeArchived informs the view if a particular constraint should be archived by the view. If a constraint is created at runtime in response to the state of the object, it isn't appropriate to archive the constraint - rather you archive the state that gives rise to the constraint. Since the majority of constraints that should be archived are created in Interface Builder (which is smart enough to set this prop to YES), the default value for this property is NO.
      • shouldBeArchived

        public boolean shouldBeArchived()
        When a view is archived, it archives some but not all constraints in its -constraints array. The value of shouldBeArchived informs the view if a particular constraint should be archived by the view. If a constraint is created at runtime in response to the state of the object, it isn't appropriate to archive the constraint - rather you archive the state that gives rise to the constraint. Since the majority of constraints that should be archived are created in Interface Builder (which is smart enough to set this prop to YES), the default value for this property is NO.