开发者

Calling modalTransitionStyle from UITableViewController - nothing happens

I finally managed to trim my code and put all the TableViewController-Methods in a separate class (away from my ViewController). I had many problems which I already solved but there is one that puzzles me.

When a selection in the table occurs, I previously loaded a modalViewController, which worked fine. But now, as I put all the Table-methods in a separate class, the modal view simply does not load. It calls the function, and steps through it nicely when I select a row in the table, but there is no view loaded on the screen of my iPhone?!

Here is the code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
TaskViewController *taskViewController = [[TaskViewController alloc] initWithNibName:@"TaskViewController" 
                                                                              bundle:nil 
                                             开发者_StackOverflow中文版                                   task:[listOfEntries objectAtIndex:indexPath.row]];
taskViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;

[self presentModalViewController:taskViewController animated:YES];
[tableView deselectRowAtIndexPath:indexPath animated:NO];

}

any suggestions?


Problems loading the NIB file? Not returning self from TaskViewController's init method? Are you sure taskViewController is not nil? Maybe you should call this on a parent navigationController? Are you setting UIModalPresentationFullScreen as the modal presentation style?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜