TWPhotoPickerController *photoPicker = [[TWPhotoPickerController alloc] init];
photoPicker.cropBlock = ^(UIImage *image) {
//do something
};
[self presentViewController:photoPicker animated:YES completion:NULL];
长期坚持这一点。我已将所有正确的头文件导入到我的桥接头文件中...只需要知道如何将此块转换为快速语法?
答案 0 :(得分:2)
它应该是这样的:
var photoPicker = TWPhotoPickerController()
photoPicker.cropBlock = { (image: UIImage) -> () in
// do something
}
presentViewController(photoPicker, animated: true, completion: nil)