I am getting the warning in the subject line above when running my app under xCode 4.3.
Here is the offending code :
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:map];
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonSystemItemDone target:self action:@selector(removeCurrent)];
map.navigationItem.rightBarButtonItem = rightButton;
[self presentModalViewController:navigationController animated:YES];
Can anyone help ?
Thank you !
UIBarButtonSystemItemDone
should be UIBarButtonItemStyleDone
. System item is used in a different init method - initWithBarButtonSystemItem:
- which may actually be better for you as it will return a localised done button rather than the fixed text you have now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With