Commit a92204bd authored by Jose Blaya's avatar Jose Blaya
Browse files

Remove force unwrapping

parent 197c2046
......@@ -150,10 +150,12 @@ open class AutolayoutViewController: UIViewController, ModalController, Restylab
let titleLabelView = UILabel(frame: CGRect.zero)
titleLabelView.style(style: TextStyle.textStyle6)
titleLabelView.text = title
Theme.current.applyCustomNavigationBar(navigationController!.navigationBar,
withTintColor: .white,
andBarTintColors: [UIColor.piaGreen,
UIColor.piaGreenDark20])
if let navController = navigationController {
Theme.current.applyCustomNavigationBar(navController.navigationBar,
withTintColor: .white,
andBarTintColors: [UIColor.piaGreen,
UIColor.piaGreenDark20])
}
let size = titleLabelView.systemLayoutSizeFitting(UILayoutFittingCompressedSize)
titleLabelView.frame = CGRect(x: 0, y: 0, width: size.width, height: size.height)
navigationItem.titleView = titleLabelView
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment