a test app for autolayout magicks
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets.xcassets/AppIcon.appiconset
AppDelegate.h
AppDelegate.m
EMView.h
EMView.m
Info.plist
PrefixHeader.pch
README.md
UIColor+EMColor.h
UIColor+EMColor.m
ViewController.h
ViewController.m
main.m

README.md

EMAutolayout

Overview

This is a test app to demonstrate autolayout magicks. Please read the full document for autolayout tips and tricks.

There are six demo modes:

EMViewTypeDefault,          // two labels vertically aligned
EMViewTypePaddingExample,   // two labels vertically aligned with padding
EMViewTypeContainerExample, // two labels centered in a container view with padding on container view
EMViewTypeFrameExample,     // demonstrates that constraints keep relationships the same between views
EMViewTypeOptionsExample,   // three labels with different alignment options
EMViewTypeMaskExample,      // labels that use autoresizingMask

You can see how the layout constraints are set up here.

Set up

  1. git clone https://github.com/mona-zsh/EMAutolayout.git
  2. Open project in XCode
  3. Build
  4. Press buttons
  5. Pressing Set Frame button will toggle the frame to half size/full size.