views:

30

answers:

1

So I have a UINavigationController that pushes a UITableViewController from the rootViewController. From the UITableViewController, I want a UIImagePickerController to be pushed when I click a certain cell. How would I get the navigation controller to display the image picker?

+1  A: 
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
    {
       UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
       imagePicker.delegate = self;
       //user this [self.navigationController pushViewController:imagePicker animated:YES];

       //or this [self presentModalViewController:imagePicker animated:YES];
       // don't release imagePicker here
    }

Then define UIPickerControllerDelegate in your tableViewController implementation.

Sanniv
Thanks a lot Sanniv
Kurbz
You are most welcome Dylan
Sanniv