0

UINavigationBar UIAppearance doesn't update when popping from a pushed view controller. But it does when dismissing from a modal view controller. Is that the normal behaviour? Is there a way to update it when only popping from a pushed view controller?

user3250560
  • 646
  • 2
  • 9
  • 15
  • can you show you code to debbug it and help you – hcarrasko Apr 03 '14 at 14:42
  • There's nothing much to see. I just modify UIAppearance in a view controller then: if I dismiss it (it was modal) the appearance doesn't update, if I pop it (it was pushed) the appearance updates. – user3250560 Apr 03 '14 at 15:03

1 Answers1

0

You need to do as follow:

let windows = UIApplication.shared.windows
for window in windows {
    for view in window.subviews {
        view.removeFromSuperview()
        window.addSubview(view)
    }
}
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
ironRoei
  • 2,049
  • 24
  • 45