ios 常用小技巧
2019-03-11 本文已影响5人
程序渣渣猿
1. 跳转到设置
NSURL *url = [NSURLURLWithString:UIApplicationOpenSettingsURLString];
if( [[UIApplication sharedApplication] canOpenURL:url] ) {
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {}];
}
2. iOS提示代码失效
- (void)JX_Device_Permission_Check_CameraAuth:(CheckPermissionCameraAuth)permission NS_DEPRECATED_IOS(2_0, 9_0,"******");
3. iOS代理提示问题
Assigning to 'id<UINavigationControllerDelegate,UIImagePickerControllerDelegate> _Nullable' from incompatible type 'ViewController *const __strong'
- (UIImagePickerController *)imagePickerController {
if (!_imagePickerController) {
_imagePickerController = [[UIImagePickerController alloc] init];
_imagePickerController.allowsEditing = NO;
// _imagePickerController.delegate = self; // 此处self会提示如题,更改方式是
_imagePickerController.delegate = (id)self;
}
return _imagePickerController;
}