在objective-c中我们做
@property (strong, nonatomic) void(^Name)(id input, id selectedListItem);
然后我们设置属性
if (self.Name) {
self.Name(self,nil);
}
访问它视图控制器
[classObject setName:^(id input, id selectedListItem)
// do something with the input and selectedListItem
];
我们如何在 swift3 中做到这一点。