一、基本定义
NSString *(^sort)(NSString *) = ^NSString *(NSString *originStr) {
NSString *sortStr = [originStr sortMethod];
return sortStr;
};
二、属性定义
@property (nonatomic,copy) NSString *(^sortStr)(NSString *);
typedef NSString *(^SortStr)(NSString *);
@property (nonatomic,copy) SortStr sort;
三、函数传参数
- (void)sortStrWithBlock:(BOOL(^)(NSString *))sort1 {
BOOL result = sort1(@"");
}