how to set imagepicker.tag=value in imagepicker

i m new in iphone sdk and when i set imagepicker.tag=vaule(100) then it produce a error so anyone help me to solve this problem

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

Answers


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

tag is a property of UIView. UIImagePickerController is a subclass of UIViewController. It does not have a tag property.


Need Your Help

xapian-full installed on mac os x snow leopard but failed with dlopen LoadError

ruby macos rubygems osx-snow-leopard xapian

Since I have tried to install xapian but failed, I try another alternative with xapian-full. Installation seems goes well, but when I try to write code with that I got toasted with error message ag...

Java - How to use a variable from a method when imported into the main class

java eclipse class variables methods

I am trying to use a variable from a method I created in another class in the main section.