smileyborg/UIView-AutoLayout — pull request #12 by rahul-malik (2014-04-16 00:00:54+00:00)
Title: Add method to control the leading and trailing spaces when auto-distributing views.

Currently when using this method in NSArray (AutoLayout):
- (NSArray *)autoDistributeViewsAlongAxis:(ALAxis)axis withFixedSpacing:(CGFloat)spacing alignment:(NSLayoutFormatOptions)alignment;

The spacing value not only specifies the spacing between the views but also a leading and trailing spacing that was unexpected when I began using it. Instead of altering this behavior, I've added a more specific method that allows you to control the leading and trailing spacing around the first and last view respectively.

The new method I've added is:
- (NSArray *)autoDistributeViewsAlongAxis:(ALAxis)axis withFixedSpacing:(CGFloat)spacing withLeadingSpacing:(CGFloat)leadingSpacing withTrailingSpacing:(CGFloat)trailingSpacing alignment:(NSLayoutFormatOptions)alignment;