简体   繁体   中英

iOS11 backBarButtonItem disabled

Before iOS11 , I use the runtime replaced the backBarButtonItem implementation change the default back button style, effects as follows, but on the iOS11 is invalid.

影响

I found that the structure of the back button below before iOS11

影响

But The structure of the back button on the iOS11 below

在此处输入图片说明

How can I get on iOS11 before implementation effect, which means backBarButtonItem without words?

Try this:

self.navigationController?.navigationBar.topItem?.title = ""

wrire this code in viewDidLoad().

Its affected in NextViewController.

If you want only backButton without the words, try going through following steps:

  1. Embed your second ViewController to NavigationController too.
  2. Drag and Drop a UIBarButton icon to the NavigationBar of Second ViewController.
  3. Add the backbutton image to the UIBarButton.

It's Done!!

Hope it will help you.

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