iOS 内容阅读视图 Lyt
- 授权协议: Apache
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/robotmedia/Lyt
- 软件文档: https://github.com/robotmedia/Lyt
软件介绍
Lyt 是 UIView 的分类,可实现自动的更多阅读内容和更少阅读内容的展示。使用方法:
[view lyt_centerInParent];
替代:
NSLayoutConstraint *centerXConstraint = [NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:view.superview attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0]; [view.superview addConstraint:centerXConstraint]; NSLayoutConstraint *centerYConstraint = [NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:view2 attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0]; [view.superview addConstraint:centerYConstraint];
