UILayoutGuide(MMMTemple)

@interface UILayoutGuide (MMMTemple)

/// Convenience initializer setting the guide's identifier.
- (id)initWithIdentifier:(NSString *)identifier;

/**
 * Not yet activated constraints anchoring the given view within the receiver according to horizontal
 * and vertical alignment flags.
 */
- (NSArray<NSLayoutConstraint *> *)mmm_constraintsAligningView:(UIView *)view
	horizontally:(MMMLayoutHorizontalAlignment)horizontalAlignment
	vertically:(MMMLayoutVerticalAlignment)verticalAlignment
	insets:(UIEdgeInsets)insets NS_SWIFT_NAME(mmm_constraints(aligning:horizontally:vertically:insets:));

- (NSArray<NSLayoutConstraint *> *)mmm_constraintsAligningGuide:(UILayoutGuide *)guide
	horizontally:(MMMLayoutHorizontalAlignment)horizontalAlignment
	vertically:(MMMLayoutVerticalAlignment)verticalAlignment
	insets:(UIEdgeInsets)insets NS_SWIFT_NAME(mmm_constraints(aligning:horizontally:vertically:insets:));

/**
 * Not yet activated constraints implementing a common layout idiom used with text:
 * - the given view is centered within the receiver,
 * - certain minimum padding is ensured on the sides,
 * - if `maxWidth > 0`, then the width of the view is limited to `maxWidth`, so it does not grow too wide e.g. on iPad.
 */
- (NSArray<NSLayoutConstraint *> *)mmm_constraintsHorizontallyCenteringView:(UIView *)view
	minPadding:(CGFloat)minPadding
	maxWidth:(CGFloat)maxWidth NS_SWIFT_NAME(mmm_constraints(horizontallyCentering:minPadding:maxWidth:));

@end

Undocumented

  • Convenience initializer setting the guide’s identifier.

    Declaration

    Objective-C

    - (nonnull id)initWithIdentifier:(nonnull NSString *)identifier;

    Swift

    init(identifier: String)
  • Not yet activated constraints anchoring the given view within the receiver according to horizontal and vertical alignment flags.

    Declaration

    Objective-C

    - (nonnull NSArray<NSLayoutConstraint *> *)
        mmm_constraintsAligningView:(nonnull UIView *)view
                       horizontally:
                           (MMMLayoutHorizontalAlignment)horizontalAlignment
                         vertically:(MMMLayoutVerticalAlignment)verticalAlignment
                             insets:(UIEdgeInsets)insets;

    Swift

    func mmm_constraints(aligning view: UIView, horizontally horizontalAlignment: MMMLayoutHorizontalAlignment, vertically verticalAlignment: MMMLayoutVerticalAlignment, insets: UIEdgeInsets) -> [NSLayoutConstraint]
  • Undocumented

    Declaration

    Objective-C

    - (NSArray<NSLayoutConstraint *> *)mmm_constraintsAligningGuide:(UILayoutGuide *)guide
    	horizontally:(MMMLayoutHorizontalAlignment)horizontalAlignment
    	vertically:(MMMLayoutVerticalAlignment)verticalAlignment
    	insets:(UIEdgeInsets)insets NS_SWIFT_NAME(mmm_constraints(aligning:horizontally:vertically:insets:));

    Swift

    func mmm_constraints(aligning guide: UILayoutGuide, horizontally horizontalAlignment: MMMLayoutHorizontalAlignment, vertically verticalAlignment: MMMLayoutVerticalAlignment, insets: UIEdgeInsets) -> [NSLayoutConstraint]
  • Not yet activated constraints implementing a common layout idiom used with text:

    • the given view is centered within the receiver,
    • certain minimum padding is ensured on the sides,
    • if maxWidth > 0, then the width of the view is limited to maxWidth, so it does not grow too wide e.g. on iPad.

    Declaration

    Objective-C

    - (nonnull NSArray<NSLayoutConstraint *> *)
        mmm_constraintsHorizontallyCenteringView:(nonnull UIView *)view
                                      minPadding:(CGFloat)minPadding
                                        maxWidth:(CGFloat)maxWidth;

    Swift

    func mmm_constraints(horizontallyCentering view: UIView, minPadding: CGFloat, maxWidth: CGFloat) -> [NSLayoutConstraint]