Back button is not visible in iOS 7

后端 未结 3 607
日久生厌
日久生厌 2020-12-31 15:21

I have some weird trouble about iOS 7. I have an UINavigationBar in my app and it works perfect for iOS 6;

-- IOS 6 --

3条回答
  •  庸人自扰
    2020-12-31 15:43

    Setting BackButtonBackgroundImage via UIAppearance currently has some odd behavior in iOS 7. This is probably related to the updated design, which replaces the rect-style button with a backIndicatorImage (an arrow).

    This leaves 3 options for customizing the back button's appearance:

    1. Change the color of the backIndicatorImage by setting the tintColor property on UINavigationBar (or one of its superclasses).

    2. Set the new backIndicatorImage property on UINavigationBar to a custom image. (don't forget to set the backIndicatorTransitionMaskImage as well or it won't work)

    3. Create a custom UIBarButtonItem and manually assign it as UINavigationItem's leftBarButtonItem. (See the answer mentioned above by Mashhadi)

提交回复
热议问题