UIView-AutoLayout icon indicating copy to clipboard operation
UIView-AutoLayout copied to clipboard

I found a bug

Open harde1 opened this issue 9 years ago • 0 comments

  • (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

harde1 avatar Jan 05 '16 04:01 harde1