Skip to content

Instantly share code, notes, and snippets.

@saoudrizwan
Last active January 16, 2017 18:27
Show Gist options
  • Save saoudrizwan/07d52224faf1e316fda65af5b49fa47b to your computer and use it in GitHub Desktop.
Save saoudrizwan/07d52224faf1e316fda65af5b49fa47b to your computer and use it in GitHub Desktop.
// show a nav bar
// 1. change some constraints
navBarHeightConstraint.update(offset: 80)
// 2. animate
UIView.animate(withDuration: 0.10, delay: 0.0, options: .curveLinear, animations: {
self.view.layoutIfNeeded() // Apple docs: "layout the subviews immediately"
}, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment