设置ImagePickerController委托

时间:2013-09-16 00:17:44

标签: ios uiimagepickercontroller

我不确定如何初始化UIImagePickerController。我无法设置代理。我想用

pickerController.delegate = self;

但是会产生警告:“将'MyViewController * const_strong'发送到不兼容类型'id'的参数”

我将我的类声明为委托(UIImagePickerControllerDelegate)并添加了这个:

UIImagePickerController *pickerController;

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

查看错误。你声明你的班级是UIImagePickerControllerDelegate,是的,但是选择器也需要你声明为UINavigationControllerDelegate