-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
# BDKGeometry | ||
|
||
A set of helper functions I've been using in various XCode projects, abstracted for great good! Documentation coming soon. | ||
A set of helper functions I've been using in various XCode projects, abstracted for great good! | ||
|
||
## Getting started | ||
|
||
Really all you should do is check out [the header file][0], but here's a list of the methods available. | ||
|
||
``` objective-c | ||
CGRect CGRectSetSize(CGRect rect, CGSize size); | ||
CGRect CGRectSetOrigin(CGRect rect, CGPoint origin); | ||
CGRect CGRectSetWidth(CGRect rect, CGFloat width); | ||
CGRect CGRectSetHeight(CGRect rect, CGFloat height); | ||
CGRect CGRectSetYOrigin(CGRect rect, CGFloat yOrigin); | ||
CGRect CGRectSetXOrigin(CGRect rect, CGFloat xOrigin); | ||
CGRect CGRectCenterRectInRect(CGRect subRect, CGRect masterRect); | ||
CGRect CGRectCenterRectInRectHorizontally(CGRect subRect, CGRect masterRect); | ||
CGRect CGRectCenterRectInRectVertically(CGRect subRect, CGRect masterRect); | ||
CGRect CGRectInsetByPercent(CGRect rect, CGFloat xPercent, CGFloat yPercent); | ||
void CGRectIntegralSizeToFit(UIView *view); | ||
CGSize CGSizeByDoubling(CGSize size); | ||
CGRect CGRectByDoublingSize(CGRect rect); | ||
``` | ||
## Installation | ||
Use [CocoaPods][1], you dingus! | ||
``` ruby | ||
# Podfile | ||
platform :ios, '5.0' | ||
pod 'BDKGeometry', '~> 1.1.0' | ||
``` | ||
|
||
[0]: https://github.com/kreeger/BDKGeometry/blob/master/BDKGeometry.h |