【问题标题】:Add a button to navigation item in code在代码中向导航项添加按钮
【发布时间】:2010-04-10 21:57:03
【问题描述】:

如何在视图控制器的导航项右侧添加一个按钮?

【问题讨论】:

    标签: objective-c iphone navigationitem


    【解决方案1】:
    self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStyleBordered target:self action:@selector(aboutB)] autorelease];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-21
      • 1970-01-01
      • 2015-01-13
      • 2013-12-23
      相关资源
      最近更新 更多