UIView-AutoLayout
UIView-AutoLayout copied to clipboard
I found a bug
- (NSArray *)autoDistributeViewsAlongAxis:(ALAxis)axis withFixedSize:(CGFloat)size insetSpacing:(BOOL)shouldSpaceInsets alignment:(NSLayoutFormatOptions)alignment
then
if (shouldSpaceInsets) { multiplier = (i * 2.0f + 2.0f) / (numberOfViews + 1.0f); constant = (multiplier - 1.0f) * size / 2.0f; } else { multiplier = (i * 2.0f) / (numberOfViews - 1.0f); constant = (-multiplier + 1.0f) * size / 2.0f; }
when shouldSpaceInsets=NO if i==0,then multiplier=0