
[英]How to programmatically create UIView -> UIViewController -> UITableView
[英]how to create a UIView with a UINavController and a UITableView
我有一个应用程序,当我按下“ i”按钮以显示“关于应用程序”视图时,我需要一个带有背景图像的视图,一个UINavigationController和一个UITableView。 如何使用InterfaceBuilder或通过编程实现该目标? 在AppDelegate中尚未完成。 我需要在一个视图上完成它。 我有以下代码,但它仅创建UINavController和UITableView。 但是使用此代码,我无法将UIImage放在后台:
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];
我该怎么做?
谢谢,RL
不确定是否可以使用,但值得尝试:
tableViewController.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"whatever.png"]];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.