简体   繁体   中英

Back button text too long on navigation bar

I'm working on my first iOS application. I'm using the navigation controller and I'm running into a small issue. The issue is that the back button's text is too long. Because the text is too long the title is not always centered. I thought about removing the back button but then I loose the swipe to go back feature. What is the best way to handle this?

您可以在每个要返回按钮的ViewController中使用它。

self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM