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
#if TARGET_IPHONE_SIMULATOR | |
@interface UIImage (RSSaveToDesktop) | |
/// Creates a RSUIImage directory on desktop and saves image to it. | |
-(void)rs_saveToDesktop; | |
/// Creates a RSUIImage directory on desktop and saves image to it with specified name. | |
-(void)rs_saveToDesktopWithName:(NSString *)customName; |
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
#ifndef RSNSMutableIndexSetMake | |
#ifndef RSNSIndexSetMake | |
#define RSNSMutableIndexSetMake(INDEXES...) \ | |
({ \ | |
NSUInteger indexes[] = {INDEXES}; \ | |
NSUInteger count = sizeof(indexes)/sizeof(NSUInteger); \ | |
NSMutableIndexSet *mutableIndexSet = [NSMutableIndexSet indexSet]; \ | |
for (int i = 0; i < count; ++i){ \ | |
[mutableIndexSet addIndex:indexes[i]]; \ | |
} \ |
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
/** | |
* Several macros simplifying use of weak references to self inside blocks | |
* which goal is to reduce risk of retain cycles. | |
* | |
* Example: | |
* @code | |
@interface Example : NSObject{ | |
int _i; | |
} |