虽然在选择从图像拾取的图像iOS 10 Objective-C和Xcode 8.我收到一个错误 -
创建具有未知类型的图像格式是错误的
.
以前的版本没问题.
这是我的代码:
UIImagePickerController* imgPicker=[[UIImagePickerController alloc] init];
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imgPicker.delegate = self;
[self presentViewController:imgPicker animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
和recive图像的委托方法是..
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissViewControllerAnimated:YES completion:NULL];
UIImage *myImage = [info objectForKey:UIImagePickerControllerOriginalImage];
}
Run Code Online (Sandbox Code Playgroud)
我也试过其他委托功能..
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
}
Run Code Online (Sandbox Code Playgroud)
但错误不会发生.
我不确定它是Xcode 8的错误吗?
如果任何人遇到问题并解决了请帮助解决它.
我需要在Unity中创建一个无限循环而不使用主线程?我看到了一些例子,但它并没有用:
while(true){
var aa;
debug.log("print.");
}
Run Code Online (Sandbox Code Playgroud)
我想添加一些延迟,例如2秒.如果有人知道解决方案请帮助.