SDAutoLayout icon indicating copy to clipboard operation
SDAutoLayout copied to clipboard

One line of code to implement automatic layout. 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于做最简单易用的AutoLayout库。The most easy way for autoLayout. B...

Results 104 SDAutoLayout issues
Sort by recently updated
recently updated
newest added

那些中东地区布局很恶心

-[__NSArrayM replaceObjectAtIndex:withObject:]: index 9223372036854775807 beyond bounds for empty array [UIView(SDAutoLayout) sd_resetLayout] (UIView+SDAutoLayout.m:)

Cell 里控件的约束添加 powerSwitch .sd_layout .rightSpaceToView(self, 15) .centerYEqualToView(self); broadcastBtn .sd_layout .leftSpaceToView(self, 0) .topSpaceToView(self, 0) .bottomSpaceToView(self, 0) .autoWidthRatio(1.); broadcastBtn.imageView .sd_layout .spaceToSuperView(UIEdgeInsetsMake(8, 8, 8, 8)); titleLab .sd_layout .topSpaceToView(self, 5) .leftSpaceToView(broadcastBtn, 5) .rightSpaceToView(powerSwitch, 0)...

有一个特殊情况,在一个view内横向显示3个子view,两边的view与父view间隔是20,子view间的间距是5,子view宽度随父view的宽度改变,这种情况下改怎么布局,是不是有现成的,只是我不会用(Offset?); 或者,是不是可以在ratio的基础上,加一个偏移量?

- (void)setPicPathStringsArray:(NSArray *)picPathStringsArray { _picPathStringsArray = picPathStringsArray; [self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; if (_picPathStringsArray.count == 0) { self.height = 0; self.fixedHeight = @(0); return; } CGFloat itemW = [self itemWidthForPicPathArray:_picPathStringsArray]; CGFloat itemH =...

UIScrollview使用SDAutoLayout布局,在向上滑动的时候页面顶部会卡顿,下拉到顶部时也会卡顿一下

self.titleLabel.sd_layout .topSpaceToView(self.iconImageView, 14) .centerXEqualToView(self.iconImageView) .autoWidthRatio(0) .autoHeightRatio(0);

deleteRowsAtIndexPaths崩溃,断点停留在[self sd_deleteRowsAtIndexPaths:indexPaths withRowAnimation:animation],deleteSections方法不会奔溃。