UITabBar appearance setSelectionIndicatorImage does not work on first launch iOS7

后端 未结 5 2285
你的背包
你的背包 2021-02-13 05:51

I have a customised UITabBar and use the following code in the AppDelegate:

- (void)tabBarController:(MainUITabBarController *)tabBarController didSelectViewCont         


        
5条回答
  •  佛祖请我去吃肉
    2021-02-13 06:33

    I think I also have had the same problem when doing my design for the new App in iOS 7!! iOS 7 has been built more of the stuff different as we all were used to things different.

    Here as I have understood we all were using StoryBoards, and were unable to integrate that Segues in our Code! :) So I choose not to mess with the code, after I tried most of all the StackOverFlow Answers regarding this! :) Because, why you wanna do so, when you have given a Goody Good Interface Builder (IB) and Story Boarding Tool?

    Question:
    When we have set our Selected Tab Image, background image specially for the tab bar, it doesn't shows which tab is selected with the image we have set in our code...???

    Solution
    Following are the screenshots of my StoryBoard Settings I did to solve this problem!

    Select your TabBarController from your via document outline panel:
    Select your TabBarController from your via document outline panel

    Set your settings for the Tab Bar from the Utilities Panel:
    Set your settings for the Tab Bar from the Utilities Panel

    Then your Program is set up to run! It now knows that first tab is selected when the App first shows the First Tab View and also which image should be shown for all the Tab Bar indicators when each of them are selected! :)
    hope you all got a clue!!! If I helped you I'm Happy!!! But if I have wasted your Time I'm So Sorry!!! :( But trust me, This worked me like a charm!!!

提交回复
热议问题