UAPadding

Objective-C

@interface UAPadding : NSObject

Swift

class UAPadding : NSObject

Padding adds constant values to a view’s top, bottom, trailing or leading constraints within its parent view.

  • top

    The spacing constant added between the top of a view and its parent’s top.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *top;

    Swift

    var top: NSNumber? { get set }
  • The spacing constant added between the bottom of a view and its parent’s bottom.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *bottom;

    Swift

    var bottom: NSNumber? { get set }
  • The spacing constant added between the trailing edge of a view and its parent’s trailing edge.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *trailing;

    Swift

    var trailing: NSNumber? { get set }
  • The spacing constant added between the leading edge of a view and its parent’s leading edge.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *leading;

    Swift

    var leading: NSNumber? { get set }
  • Factory method to create a padding object.

    Declaration

    Objective-C

    + (nonnull instancetype)paddingWithTop:(nullable NSNumber *)top
                                    bottom:(nullable NSNumber *)bottom
                                   leading:(nullable NSNumber *)leading
                                  trailing:(nullable NSNumber *)trailing;

    Swift

    convenience init(top: NSNumber?, bottom: NSNumber?, leading: NSNumber?, trailing: NSNumber?)

    Parameters

    top

    The top padding.

    bottom

    The bottom padding.

    leading

    The leading padding.

    trailing

    The trailing padding.

    Return Value

    padding instance with specified padding.

  • Factory method to create a padding object with a plist dictionary.

    Declaration

    Objective-C

    + (nonnull instancetype)paddingWithDictionary:
        (nullable NSDictionary *)paddingDict;

    Swift

    convenience init(dictionary paddingDict: [AnyHashable : Any]?)

    Parameters

    paddingDict

    The dictionary of keys and values to be parsed into a padding object.

    Return Value

    padding instance with specified padding.