Last active
September 22, 2017 16:17
-
-
Save armstrongnate/f7b34308d243ed09434adb122b5d1575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<<<<<< HEAD | |
if let titleView: UIView = titleViewFromNavBarImagePath(navBarImagePath: navBarImagePath) { | |
titleView.contentMode = .scaleAspectFit | |
let container = UIView(frame: CGRect(x: 0, y: 0, width: 32, height: 32)) | |
titleView.frame = CGRect(x: 0, y: 0, width: 32, height: 32) | |
container.addSubview(titleView) | |
self.navigationItem.titleView = container | |
} | |
else { | |
self.navigationItem.titleView = nil | |
} | |
======= | |
let titleView: UIView? = titleViewFromNavBarImagePath(navBarImagePath: navBarImagePath) | |
titleView?.frame = CGRect(x: 0, y: 0, width: 32, height: 32) | |
if let titleView = titleView { | |
NSLayoutConstraint.activate([ | |
titleView.widthAnchor.constraint(equalToConstant: 32.0), | |
titleView.heightAnchor.constraint(equalToConstant: 32.0) | |
]) | |
} | |
titleView?.contentMode = .scaleAspectFit | |
titleView?.autoresizingMask = navigationItem.titleView?.autoresizingMask ?? [.flexibleWidth, .flexibleHeight] | |
self.navigationItem.titleView = titleView | |
>>>>>>> develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment