iPhone/iPad导航条右上侧添加自定义按钮

        UIBarButtonItem *infoButton = [[UIBarButtonItem alloc] initWithTitle:@"Info" style:UIBarButtonItemStyleBordered target:self action:@selector(showInfo:)];
        self.navigationItem.rightBarButtonItem = infoButton;

其中showInfo为自己定义的方法。


你可能感兴趣的:(iPhone/iPad导航条右上侧添加自定义按钮)