【发布时间】:2020-12-03 13:35:05
【问题描述】:
我有这个来自 answer 的 Objective-c 代码,用于请求在 iOS 上使用相机。
[AVCaptureDevice requestAccessForMediaType:mediaType completionHandler:^(BOOL granted)
{
if(granted){
return true;
} else {
return false;
}
}];
我收到此错误:
Cannot initialize a parameter of type 'void (^ _Nonnull)(BOOL)' with an rvalue of type 'bool (^)(BOOL)'
什么是错误?
【问题讨论】:
标签: ios objective-c ios-camera