HandyFrame 1.2.0

HandyFrame 1.2.0

测试测试
语言语言 Obj-CObjective C
许可 MIT
发布时间最新版本发布时间2017年10月

Casa Taloyum 维护。



  • 出品者:
  • CasaTaloyum

HandyAutoLayout

[](http:// opensource.org/licenses/MIT)

HandyAutoLayout 是用于程序化生成 NSLayoutConstraint 的便捷类别。

新功能

在 1.1.0 版本中添加了新方法

- (void)fromTheTop:(CGFloat)distance ofView:(UIView *)view;
- (void)fromTheBottom:(CGFloat)distance ofView:(UIView *)view;
- (void)fromTheLeft:(CGFloat)distance ofView:(UIView *)view;
- (void)fromTheRight:(CGFloat)distance ofView:(UIView *)view;

安装

如果您在使用 AutoLayout

pod 'HandyAutoLayout'

如果您在使用 Frame

pod 'HandyFrame'

示例

自动布局

[self.view addConstraint:[self.tableView constraintCenterXEqualToView:self.view]];
[self.view addConstraint:[self.tableView constraintWidthEqualToView:self.view]];

[self.view addConstraints:[self.nextStepButton constraintsSize:CGSizeMake(300.0f, 40.0f)]];
[self.view addConstraint:[self.nextStepButton constraintCenterXEqualToView:self.view]];

框架

[self.subtitleLabel leftEqualToView:self.titleLabel];
[self.subtitleLabel top:14 FromView:self.timeLabel];

[self.createPost centerXEqualToView:self.view];
[self.createPost bottomInContainer:19.0f shouldResize:NO];