I try to follow this one, but it doesn't work.
How can we put two line in UIBarButtonItem in Navigation Bar
I don't know why the button view I created and assigned to the bar button item cannot display at all?
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
button1.titleLabel.numberOfLines = 0;
[button1 setTitle:NSLocalizedString(@"REQUEST\nEQUIPMENT", nil) forState:UIControlStateNormal];
self.barButton = [[UIBarButtonItem alloc] initWithCustomView:button1];
The problem is that you are making a bar button item but you are never putting it into the interface. Setting
self.barButtonItem doesn't put the bar button item into the interface; it just retains the bar button item. This has nothing at all to do with the "two-line" question. You cannot make any bar button item appear by doing what you're doing.
A bar button item appears when, say, you are a view controller in a navigation interface and you set
self.navigationItem.rightBarButtonItem to your bar button item. But you are not doing that.