NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
Functions | |
CGRect | NIRectContract (CGRect rect, CGFloat dx, CGFloat dy) |
CGRect | NIRectExpand (CGRect rect, CGFloat dx, CGFloat dy) |
CGRect | NIRectShift (CGRect rect, CGFloat dx, CGFloat dy) |
CGRect | NIEdgeInsetsOutsetRect (CGRect rect, UIEdgeInsets outsets) |
CGFloat | NICenterX (CGSize containerSize, CGSize size) |
CGFloat | NICenterY (CGSize containerSize, CGSize size) |
CGRect | NIFrameOfCenteredViewWithinView (UIView *viewToCenter, UIView *containerView) |
CGSize | NISizeOfStringWithLabelProperties (NSString *string, CGSize constrainedToSize, UIFont *font, NSLineBreakMode lineBreakMode, NSInteger numberOfLines) |
For manipulating CGRects.
These methods provide additional means of modifying the edges of CGRects beyond the basics included in CoreGraphics.
Modifies only the right and bottom edges of a CGRect.
Example result: CGRectMake(x, y, w - dx, h - dy)
Modifies only the right and bottom edges of a CGRect.
Example result: CGRectMake(x, y, w + dx, h + dy)
Modifies only the top and left edges of a CGRect.
Example result: CGRectMake(x + dx, y + dy, w - dx, h - dy)
Inverse of UIEdgeInsetsInsetRect.
Example result: CGRectMake(x - left, y - top, w + left + right, h + top + bottom)
Returns the x position that will center size within containerSize.
Example result: floorf((containerSize.width - size.width) / 2.f)
Returns the y position that will center size within containerSize.
Example result: floorf((containerSize.height - size.height) / 2.f)
Returns a rect that will center viewToCenter within containerView.
Returns the size of the string with given UILabel properties.