Reputation: 837
Hi guys in my iphone app. i am using the tableview in alertview using this tutorial http://www.skylarcantu.com/blog/2009/10/10/embedding-uitables-into-uialertviews/
I'm just skipped the unwanted codes and uses only the below code
- (void)alertButtonPressed:(UIButton *)button {
UITableAlert *alert = [[UITableAlert alloc] initWithTitle:@"Table Alert" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
alert.delegate = self;
[alert show];
[alert release];
}
I used the delegate methods and included the required class files. Now i want to findout which item i have chosen. Iam getting only 0 for all the items in my tableview. Can you please help me if you have a solution or is there are other way to use the tableview in alertview? This is for chosing language option in my app. Thanks
Upvotes: 0
Views: 432
Reputation: 1096
You have to implement the tableView:didSelectRowAtIndexPath: method from the UITableViewDelegate protocol.
Upvotes: 1