我写的是一架有导航控制器的SOS。 当我向Simulator开放时,它会受到罚款。 当我操作该装置时,在状态栏下播放了一个空白屏幕。 加上我可以指出,我的“根基勒”是默认的观点(我怀疑这是我问题的根源)。
@class RootViewController;
@interface MyAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
RootViewController *viewController;
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property (nonatomic, retain) IBOutlet RootViewController *viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Set the navigation controller as the window s root view controller and display.
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
// ...
return YES;
}
GenViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Main Menu";
}
没有任何观点、观点和看法。
显示零件。
- (UITableViewCell *)tableView:(UITableView *)tv
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
tv.backgroundColor = [UIColor whiteColor];
UITableViewCell *cell;
if (indexPath.row == 0)
cell = newsCell;
else if (indexPath.row == 1)
cell = configureCell;
else if (indexPath.row == 2)
cell = aboutCell;
return cell;
}
- (NSInteger)tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)section
{
return 0;
}
#pragma mark UITableViewDelegate Methods
- (CGFloat)tableView:(UITableView *)tv
heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 84;
}
- (void) tableView:(UITableView *)tv
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (0 == indexPath.row)
{
}
else if (1 == indexPath.row)
{
}
else if (2 == indexPath.row)
{
}
}
#pragma mark -
#pragma mark Memory management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn t have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc that aren t in use.
}
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
[tableView release];
[newsCell release];
[configureCell release];
[aboutCell release];
}
RootViewController.h
@interface RootViewController : UIViewController
<UITableViewDataSource, UITableViewDelegate>
{
UITableView *tableView;
IBOutlet UIView *displaySplashScreen;
IBOutlet UITableViewCell *newsCell, *configureCell, *aboutCell;
}
@property (nonatomic, retain) IBOutlet UITableView *tableView;