Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1.17 KB

File metadata and controls

25 lines (14 loc) · 1.17 KB

SmartAutoLayout

SmartAutoLayout is an extended form of NSLayoutConstraint that provides the facility to add device specific layout constraints from Storyboard or Xib.

How To Use

  1. Add SmartLayoutConstraint.swift, NSLayoutConstraint+NSCoding.h and UIDeviceExt.swift files in your project.

  2. Create Bridging Header for your project. How to create Bridging Header

  3. Import NSLayoutConstraint+NSCoding.h in your bridging header.

    alt text

  1. Select the NSLayoutConstraint in your interface builder and change the class to SmartLayoutConstraint

alt text

  1. Choose the devices in which you want to make active/inactive your Layout Constraint.

alt text