In my iOS application, I present a UItableViewController using
...
[self presentViewController:vc animated:YES completion:nil];
...
Now, after I click a row in my table view, I want to reject my tableview controller:
#pragma mark UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self dismissViewControllerAnimated:true completion:^(void) {
NSLog(@"dismissed");
}];
}
Now my problem is: Eliminating the deviations ViewControllerAnimated works as intended, but I have to click the line 2 times. The first time you click on a line, nothing happens.
Observations so far:
- I press the line once: nothing happens
- I press the line 2 times: TableviewController fires, "fires" is registered
- I click the row once and reject the Tableview, clicking somewhere outside the modality: "fired" is logged
, "", . .
- , ?