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
#import <Foundation/Foundation.h> | |
@interface NSArray (Monolithic) | |
- (Class)genericsType; | |
+ (id)arrayWithClass:(Class)genericsType | |
withArray:(NSArray *)array; | |
@end |
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
#import <Foundation/Foundation.h> | |
// return 0 if nil Blocks. (like nil NSObject) | |
// ex. FPB(block)(); // OK | |
// FPB(block)(obj1, obj2); // OK | |
// NSString *str = FPB(block)(); // OK | |
// FPB(block); // NG | |
// NSString *str = FPB(block); // NG, no warning | |
// int a = 1 + (FPB(block)(10)); // OK, need () |
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
#import <Foundation/Foundation.h> | |
#import "FPCommon.h" | |
typedef void (^FPWeakTargetBlock)(typeof_weak_target self); | |
@interface FPAntiCircularReferenceBlockPractice : NSObject |
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
#import <UIKit/UIKit.h> | |
// Shortcut of frame rect | |
@interface UIView (BOX) | |
@property (nonatomic, assign) CGFloat box_x; | |
@property (nonatomic, assign) CGFloat box_y; | |
@property (nonatomic, assign) CGFloat box_width; |