navigator=[[UINavigationController alloc]initWithRootViewController:contacts]; UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:@"Delete" style:UIBarButtonItemStyleBordered target:self action:@selector(makeCall)]; [[self.navigator navigationItem] setLeftBarButtonItem:nextButton]; [nextButton release];
Я не могу добавить UIBarButtonItem в UINavigationController, пожалуйста, помогите
Говорите здесь, например, вместо
[[self.navigator navigationItem] setLeftBarButtonItem:nextButton];
, используйте
self.navigator.navigationBar.items = [NSArray arrayWithObject:nextButton];
, чтобы делать то, что вы хотите.