Created
April 20, 2016 10:52
-
-
Save rickyngan/ae63633d8fa6396669ec3dcc7331f341 to your computer and use it in GitHub Desktop.
UIView Padding
This file contains 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
let labelHeight = self.addressLabel.intrinsicContentSize().height | |
self.mapView.padding = UIEdgeInsets(top: self.topLayoutGuide.length, left: 0, | |
bottom: labelHeight, right: 0) | |
UIView.animateWithDuration(0.25) { | |
//2 | |
self.pinImageVerticalConstraint.constant = ((labelHeight - self.topLayoutGuide.length) * 0.5) | |
self.view.layoutIfNeeded() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment