iOS 5 UINavigationBar removing subviews ( image subview) removes navigation bar

前端 未结 2 1932
故里飘歌
故里飘歌 2020-12-31 15:13

In my application that works fine on iOS 4 navigationBar dissappeared starting iOS 5. Here is what I figured caused issue: I was removing subviews in RootViewController view

2条回答
  •  难免孤独
    2020-12-31 15:52

    setTag for those image and uilabel then removing it from code above did the trick.

    for(UIView* view in self.navigationController.navigationBar.subviews)
    {
       if(view.tag == 9 || view.tag == 99)
       {
          [view removeFromSuperview];
       }
    }
    

提交回复
热议问题