Closed awulf closed 7 years ago
When pushing SwiftWebVC on the navigation controller and pressing back again before loading, it can cause SwiftWebVC to crash due to forced unwrapped optionals.
Solution: from line 197 in SwiftWebVC.swift replace
197
SwiftWebVC.swift
if !closing { if presentingViewController == nil { navigationController!.toolbar.barTintColor = navigationController!.navigationBar.barTintColor } else { navigationController!.toolbar.barStyle = navigationController!.navigationBar.barStyle } navigationController!.toolbar.tintColor = navigationController!.navigationBar.tintColor toolbarItems = items as? [UIBarButtonItem] }
with
if let navigationController = navigationController, !closing { if presentingViewController == nil { navigationController.toolbar.barTintColor = navigationController.navigationBar.barTintColor } else { navigationController.toolbar.barStyle = navigationController.navigationBar.barStyle } navigationController.toolbar.tintColor = navigationController.navigationBar.tintColor toolbarItems = items as? [UIBarButtonItem] }
Good spot. Thanks for this.
When pushing SwiftWebVC on the navigation controller and pressing back again before loading, it can cause SwiftWebVC to crash due to forced unwrapped optionals.
Solution: from line
197
inSwiftWebVC.swift
replacewith