Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intermediate Auto Layout

Peter Stuart
December 12, 2013

Intermediate Auto Layout

Talk given at CocoaHeads Boston.

Peter Stuart

December 12, 2013
Tweet

Other Decks in Technology

Transcript

  1. Scroll Views - (void)keyboardWillShow:(NSNotification *)notification { CGFloat offset = ...;

    self.bottomConstraint.constant = offset; [UIView animate...:^{ [self.view layoutIfNeeded]; }]; }
  2. Misc. • Align views/controls that contain text using NSLayoutAttributeBaseline, not

    NSLayoutAttributeCenterY • Manage constraints with views, not view controllers • Avoid using explicit sizes