One line of code to implement automatic layout. 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于做最简单易用的AutoLayout库。The most easy way for autoLayout. Based on runtime.
(void)setWidth:(CGFloat)width {
if (self.ownLayoutModel.widthEqualHeight) {
if (width != self.height) return;
}
CGRect frame = self.frame;
frame.size.width = width;
if (self.ownLayoutModel.heightEqualWidth) {
frame.size.height = width;
}
self.frame = frame;
}
显示是frame的width是NaN导致异常
pod配置
platform :ios, "8.0"
use_frameworks!
pod 'AFNetworking','~> 3.0.4'
pod 'ReactiveCocoa', '~> 2.5’
pod 'Masonry'
pod 'FDStackView', '1.0'
pod 'YYKit'
pod 'SVProgressHUD', '~> 2.0-beta8'
pod 'Charts', '~> 2.2.1'
pod 'FMDB'
调用Demo里面的DemoCell, ViewController是代码代码创建的,其他的完全一样, 每次异常定位到这里
pod配置 platform :ios, "8.0" use_frameworks! pod 'AFNetworking','~> 3.0.4' pod 'ReactiveCocoa', '~> 2.5’ pod 'Masonry' pod 'FDStackView', '1.0' pod 'YYKit' pod 'SVProgressHUD', '~> 2.0-beta8' pod 'Charts', '~> 2.2.1' pod 'FMDB'