This file contains hidden or 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
| pod 'AFNetworking' # making requests | |
| pod 'CocoaLumberjack' # logging | |
| pod 'MagicalRecord' # coredata | |
| pod 'FastttCamera' # taking pictures | |
| pod 'WYPopoverController' # popover on iphone | |
| pod 'FBSDKCoreKit' # facebook | |
| pod 'FBSDKLoginKit' # facebook | |
| pod 'FBSDKShareKit' # facebook | |
| pod 'OAStackView' # UIStackView on iOS7 | |
| pod 'REMenu', :git => 'git@github.com:romaonthego/REMenu.git' # drop down menu |
This file contains hidden or 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
| CGFloat ScaleToAspectFitRectInRect(CGRect rfit, CGRect rtarget) | |
| { | |
| // first try to match width | |
| CGFloat s = CGRectGetWidth(rtarget) / CGRectGetWidth(rfit); | |
| // if we scale the height to make the widths equal, does it still fit? | |
| if (CGRectGetHeight(rfit) * s <= CGRectGetHeight(rtarget)) { | |
| return s; | |
| } | |
| // no, match height instead | |
| return CGRectGetHeight(rtarget) / CGRectGetHeight(rfit); |
OlderNewer