سؤال

This is my code :

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:vc];
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"RETURN" style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropertyList:)];
navigationController.navigationItem.rightBarButtonItem = anotherButton;
[anotherButton release];       
[IpadAppDelegate.stackController presentModalViewController:navigationController animated:YES];

enter image description here

هل كانت مفيدة؟

المحلول

I find out the reason :

need change navigationController.navigationItem.rightBarButtonItem = anotherButton;

to: self.navigationItem.rightBarButtonItem = anotherButton;

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top