如何将按钮UINavigationControl
添加到我添加到的 a 中ViewController
?(该项目不是UINavigationControler
基于。)
这是我添加到我的viewDidLoad
方法中的代码:
navigation = [[UINavigationController alloc] init];
navigation.view.frame = CGRectMake(0, 0, 1024, 748);
navigation.navigationBar.tintColor = [UIColor blackColor];
navigation.navigationBar.alpha = 1.0f;
navigation.navigationBar.translucent = NO;
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
[navigation.navigationItem setRightBarButtonItem:cancelButton animated:YES];
[cancelButton release];
[self.view addSubview:navigation.view];
[self pushPresentationList];
有人可以帮我修复第 7-9 行吗?