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
| // | |
| // NSString+UsefulStuff.h | |
| // | |
| // Duane Sibilly <[email protected]> | |
| // 6/21/11 | |
| // Copyright (c) 2011-2012 Duane Sibilly. All rights reserved. | |
| #import <Foundation/Foundation.h> | |
| // The use of the parenthesis in the interface declaration is what tells the |
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
| /* | |
| Before: | |
| CGRect frame = myView.frame; | |
| frame.origin.x = newX; | |
| myView.frame = frame; | |
| After: | |
| myView.x = newX; | |
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
| static __inline__ CGRect CGRectFromCGSize( CGSize size ) { | |
| return CGRectMake( 0, 0, size.width, size.height ); | |
| }; | |
| static __inline__ CGRect CGRectMakeWithCenterAndSize( CGPoint center, CGSize size ) { | |
| return CGRectMake( center.x - size.width * 0.5, center.y - size.height * 0.5, size.width, size.height ); | |
| }; | |
| static __inline__ CGRect CGRectMakeWithOriginAndSize( CGPoint origin, CGSize size ) { | |
| return CGRectMake( origin.x, origin.y, size.width, size.height ); |
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
| // | |
| // NSArray+FirstObject.h | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSArray (FirstObject) | |
| - (id)firstObject; |
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
| #import <Foundation/Foundation.h> | |
| @interface NSString (Extensions) | |
| + (NSString *)stringToSha1:(NSString *)str; | |
| - (NSNumber*)stringToNSNumber; | |
| - (BOOL)isEmpty; | |
| - (BOOL)stringContainsSubString:(NSString *)subString; | |
| - (NSString *)stringByReplacingStringsFromDictionary:(NSDictionary *)dict; |
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
| @interface UILabel (dynamicSizeMe) | |
| -(float)resizeToFit; | |
| -(float)expectedHeight; | |
| @end |
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
| // | |
| // MKMapView+MoveLogo.h | |
| // | |
| // Created by Maciej Swic on 2013-07-08. | |
| // Released under the MIT license. | |
| // | |
| // This category allows you to move the MKMapView logo so that it remains visible if you | |
| // put other stuff on the mapview. If the logo is hidden, the app won't pass the App Store | |
| // review. Tested with iOS 5 through 7. | |
| // |
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
| #import <UIKit/UIKit.h> | |
| @interface UIView (Stacker) | |
| - (void)stackSubviews; | |
| @end |
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
| #import <UIKit/UIKit.h> | |
| @interface UIView (RoundedCorners) | |
| - (void)setRoundedCorners:(UIRectCorner)corners radius:(CGSize)size; | |
| @end |
NewerOlder