我刚开始在iOS开发中,所以在我的第一个项目中,我正在开发一个简单的iOS应用程序来拍摄照片并将其显示在屏幕上.
- - (IBAction)takePicture:(id)sender {
- UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
- imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
- imagePicker.delegate = self;
- [self presentModalViewController:imagePicker animated:YES];
- }
我收到以下警告:
- Assigning to 'id<UINavigationControllerDelegate,UIImagePickerControllerDelegate>' from incompatible type 'todd_learningViewController *const __strong'
我不明白警告信息,不知道如何摆脱警告.
谢谢,
编辑:
我的头文件类似如下:
- @interface todd_learningViewController : UIViewController <UIApplicationDelegate>
- - (IBAction)takePicture:(id)sender;
- @property (weak,nonatomic) IBOutlet UIImageView *pictureView;
- @end
我该怎么修改呢?