self.navigationItem.hidesBackButton = YES;//可以隐藏原有的导航栏返回按钮
//设置的按钮会显示在导航栏左边,返回按钮的位置
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(buttonOF:)];
self.navigationItem.leftBarButtonItem = barButtonItem;