如何在imagepicker中设置imagepicker.tag = value

时间:2012-06-13 10:19:56

标签: iphone objective-c ios xcode

我是iphone sdk的新手,当我设置图片picker.tag = value(100)然后它会产生错误,所以任何人都可以帮我解决这个问题

   `  imagepicker=[[UIImagePickerController alloc]init];
    imagepicker.delegate=self;
    imagepicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
    [self presentModalViewController:imagepicker animated:YES];`

2 个答案:

答案 0 :(得分:3)

imagepicker=[[UIImagePickerController alloc]init];
imagepicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagepicker animated:YES];
imagepicker.view.tag = 100;

答案 1 :(得分:2)

tagUIView的属性。 UIImagePickerControllerUIViewController的子类。它没有tag属性。