Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshdholtz/layoutofrelativity
iOS relative layout rules
https://github.com/joshdholtz/layoutofrelativity
Last synced: 17 days ago
JSON representation
iOS relative layout rules
- Host: GitHub
- URL: https://github.com/joshdholtz/layoutofrelativity
- Owner: joshdholtz
- Created: 2012-04-28T01:55:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-06-06T20:33:20.000Z (over 11 years ago)
- Last Synced: 2024-10-11T10:33:05.607Z (about 1 month ago)
- Language: Objective-C
- Size: 162 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
LayoutOfRelativity
==========Easily turn this...
![The before](http://i.imgur.com/YooX9.png)
Into this...
![The after](http://i.imgur.com/cOLsO.png)
### Example usage
```objc
#import "UIView+RelativityLaws.h"// Fits label to height of text to but keeps initial width
[_lblOne fitLabelHeight];
[_lblTwo fitLabelHeight];// Moves _lblTwo to the bottom of _lblOne
[_lblTwo alignBelow:_lblOne withSpacing:10];// Moves the bottom of _viewLblWrapper to bottom of _lblTwo
[_viewLblWrapper alignToChildBottom:_lblTwo withSpacing:10];```