I've searched on Stack Overflow for 6 hours straight but I still can't solve my problem. It says I have an undeclared identifier when I clearly identified in the .h file. It just keeps doing this and doing this and doing this. No matter what I do.
In the .h file I have
UIImagePickerController *imagePicker;
and in the .m file I have
imagePicker = [[UIImagePickerController alloc]init];
From what i know, instance variable are declared in a the .m file. In the .h you declare the properties. So you should have something like this:
@implementation MyClass{
UIImagePickerController *_imagePicker;
....
}
If you need it to be a public variable, declare it as a property in the .h file:
@property(nonatomic, strong) UIImagePickerController *imagePicker;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments