how to create a UIView with a UINavController and

2019-08-27 17:47发布

I have an App and, when I press the 'i' button, to show the About App view, I need to have a view, with a background image, with a UINavigationController and a UITableView. How can I achieve that, with InterfaceBuilder, or progamatically? It's not done in AppDelegate. I need it to be done on a view. I have the following code, but it only creates the UINavController and the UITableView. But with this code I'me unable to put a UIImage in the background:

UITableViewController *tableViewController = [[UITableViewController alloc] initWithStyle: UITableViewStyleGrouped];
tableViewController.title = @"About";

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController: tableViewController];

navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:navController animated:YES];

[navController release];
[tableViewController release];

How can I do it?

Thanks, RL

1条回答
劫难
2楼-- · 2019-08-27 18:27

Not sure if this will work but worth at try:

tableViewController.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"whatever.png"]];
查看更多
登录 后发表回答