1. Jumping from Controllera to photographic uiimagepickercontroller can only be used in presentviewcontroller form, because when defining Uiimagepickercontroller,
Uiimagepickercontroller *pickercontroller == no;pickercontroller. delegate == Uiimagepickercontrollersourcetypecamera;
When setting delegate, if only uiimagepickercontrollerdelegate is introduced, the following warning is reported:
assigning to 'ID<UINavigationControllerDelegate,UIImagePickerControllerDelegate> ' from incompatible Type ' Addsightingviewcontroller *const __strong '
The workaround is to add uinavigationcontrollerdelegate again. As follows
@interface Controllera () <UIImagePickerControllerDelegate,UINavigationControllerDelegate>@end
So when the jump interface is used
[Self.navigationcontroller Pushviewcontroller:pickercontroller Animated:yes];
will report pushing a navigation controller is not supported error
Warning
2. Fix a valid provisioning profile for this executable is not found issue
When you import a signature and a certificate, this problem still occurs with true machine debugging, so you can follow these steps to troubleshoot
① first Check if provisioning profile is successfully imported
I use the Xcode version of 7.3.1, window-->devices--> check the running real machine-->provisioning profiles view
② Check if the Code Signing Identity in Project and Target is set, it must be the same
3. When depositing basic data types into Nsarray, you can use NSNumber, or you can use shorthand
// nsnumber form _signtypesarr = [Nsarray arraywithobjects:[nsnumber numberwithinteger:3],[nsnumber Numberwithinteger:2], nil];
// abbreviated form _signtypesarr = [Nsarray arraywithobjects:@ (2), @ (2), @ (2), @ (1 ), @ (3), @ (3), @ (3), nil];
But when reading from the array, the following is not an error, but the value is not correct, will take the unexpected value
Nsinteger typeDef = Self.signtypesarr[i];
The right thing is
Nsinteger typeDef = [self.signtypesarr[i] integervalue];
4.NSError conversion to NSString
Nserror *error= [nserror errorwithdomain:@ "" Code:0*errorstr = [Error localizeddescription ];
iOS work notes (12)