Tutorial by Examples

//Swift let barButtonItem = UIBarButtonItem(title: "Greetings!", style: .Plain, target: self, action: #selector(barButtonTapped)) self.navigationItem.rightBarButtonItem = barButtonItem //Objective-C UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Greeti...
The example below shows how to add a navigation bar button (called a UIBarButtonItem) in the Interface Builder. Add a Navigation Controller to your Storyboard Select your View Controller and then in the Xcode menu choose Editor > Embed In > Navigation Controller. Alternatively, you could ...
Provided that barButtonItem has a non-null image property (e.g. set in the Interface Builder). Objective-C barButtonItem.image = [barButtonItem.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

Page 1 of 1