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
2010-07-09 09:37:17
Thanks a lot Sanniv
Kurbz
2010-07-09 14:29:09
You are most welcome Dylan
Sanniv
2010-07-15 05:02:35