0
问题添加栏按钮项目
我不能为我的生命得到它显示。
这里的导航栏的实施
_navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 50)];
[_navBar setDelegate:self];
[self.view addSubview:_navBar];
_navBar是UINavigationBar
财产。
这里是我添加按钮的地方。
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
target:self
action:@selector(flipView:)];
self.navigationItem.rightBarButtonItem = button;
然而,没有显示。任何帮助?
感谢您的回答,我想这可能是结局。 – Daniel
添加了一些代码来向您展示第二种方法的工作原理。 – matt