Skip to content

leahfitch/EUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EUI

This project is currently a library of layout managers for use with UIKit. The long term plan is to identify and abstract really laborious and error-prone day to day tasks but only if they are really laborious and painfully error-prone so as to keep the library lightweight.

These are the currently supported layouts:

  • Horizontal box
  • Vertical box
  • Flow aligned left
  • Flow aligned right
  • Flow aligned center
  • Grid

Using it

Clone the source and open up the project in XCode. You will see two targets. One is a kitchen sink example application, the other is a static library. To use EUI in your own project you can link to the static library or just copy the sources.

Gimmee the 15 second overview

Ok, it's pretty simple. There is an EUIContainer class which is a subclass of UIView. To use layouts, you create an EUIContainer and set its layout property to one of the EUILayout classes. Containers can have a delegate which will get notified when the size of the container changes. EUILayout will lay out its container's subviews when it is sent the message layoutContainer. You can also layout the container and specify the sizes for each subview at the same time by sending layoutContainerWithSubviewSizes. This makes it possible to animate a lot of changes in one block smoothly. Container's update their own layout as well as their children's when layoutSubviews is called.

Don't forget to check out the example app if it's not clicking.

License

You can do whatever you like with it 'cuz it's MIT.

About

Layout managers for UIKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published