iOS应用视图布局库 LayoutKit
- 授权协议: Apache
- 开发语言: Swift
- 操作系统: 跨平台
- 软件首页: https://github.com/linkedin/LayoutKit
- 软件文档: https://github.com/linkedin/LayoutKit/blob/master/README.md
- 官方下载: git@github.com:linkedin/LayoutKit.git
软件介绍
LayoutKit 是一个高性能的iOS应用视图布局库。
LayoutKit 的主要优点:
速度快:性能可以与专门写的定制的布局代码相媲美,比Auto Layout快非常多;
异步:在后台线程中做布局运算,所以不会干扰与用户的交互;
声明性的:用不可变的数据结构声明布局,这样更容易开发、审核、调试和维护布局代码;
可缓存的:布局结果都是不可变的数据结构,所以可以在后台线程中计算并缓存,可以非常大的提升性能;
而且 LayoutKit 还很好用:
UIKit友好:LayoutKit生成UIView,也提供适配器来方便与UITableView和UICollectionView一起使用;
国际化:可以自动为从右到左的语言调整视图;
Swift:可以在Swift应用中使用;
成熟:单元测试覆盖率超过90%,已经用于最新版的LinkedIn iOS应用;
Hello world
let image = SizeLayout<UIImageView>(width: 50, height: 50, config: { imageView in
imageView.image = UIImage(named: "earth.jpg")
})
let label = LabelLayout(text: "Hello World!", alignment: .center)
let stack = StackLayout(
axis: .horizontal,
spacing: 4,
sublayouts: [image, label])
let insets = UIEdgeInsets(top: 4, left: 4, bottom: 4, right: 8)
let helloWorld = InsetLayout(insets: insets, layout: stack)
helloWorld.arrangement().makeViews(in: rootView)
Persuasive Technology
B.J. Fogg / Morgan Kaufmann / 2002-12 / USD 39.95
Can computers change what you think and do? Can they motivate you to stop smoking, persuade you to buy insurance, or convince you to join the Army? "Yes, they can," says Dr. B.J. Fogg, directo......一起来看看 《Persuasive Technology》 这本书的介绍吧!
