I have a problem since this morning and I'm going insane not to find the solution.
Here is my problem :
I have a view controller that contains an UItableView and some other stuff... no problem with that part : my tableView call my webService, and reload the filled tableView. But when I want to trigger the execution of a segue on the selection of an UItableViewCell nothing happens.
My tableView DataSource and Delegate are set :
I tried several methods but nothing works :
1) Directly link the segue on the cell 2) Declare the segue on the viewController and call it with "performSegue" when "didSelectRowAtIndexPath" is called 3) Restart Xcode (yes, I was desperate)
But, as I said it before, the delegate and datasource methods of my tableView are correctly called except "didSelectRowAtIndexPath"
Does someone already encounter this problem and found the solution ?
EDIT :
Here is the implementation of the tableView dataSource methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return campagneList.count; //return 2 at execution
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"observatoireSegue" sender:self];
NSLog(@"test didSelectRowAtIndexPath");
}
didSelectRowAtIndexPath
? A common mistake is also to implementdidDeselectRowAtIndexPath
instead. – streemViewController
? Shouldn't you be subclassing fromUIViewController
? Or even better, if the table is the only thing on the screen subclass fromUITableViewController
. – Fogmeister