文件.h
- (UIView *(^)(UIColor *color)) setColor;
文件.m
- (UIView *(^)(UIColor *color)) setColor
{
return ^ (UIColor *color) {
self.backgroundColor = color;
return self;
};
}
- (UIView *(^)(UIColor *color)) setColor;
- (UIView *(^)(UIColor *color)) setColor
{
return ^ (UIColor *color) {
self.backgroundColor = color;
return self;
};
}
本文标题:OC的Block新颖的写法
本文链接:https://www.haomeiwen.com/subject/zojczttx.html
网友评论