弹出视图控制器时UIAppearance未更新

时间:2014-04-03 14:35:00

标签: ios iphone objective-c cocoa-touch uiappearance

UINavigationBar UIAppearance在从推送的视图控制器弹出时不会更新。但是当从模态视图控制器中解雇时它会这样做。这是正常的行为吗?有没有办法在仅从推送的视图控制器弹出时更新它?

1 个答案:

答案 0 :(得分:0)

您需要执行以下操作:

let windows = UIApplication.shared.windows
for window in windows {
    for view in window.subviews {
        view.removeFromSuperview()
        window.addSubview(view)
    }
}