Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to layout a view between two other views #172

Merged
merged 11 commits into from
Aug 28, 2018
Merged

Conversation

lucdion
Copy link
Member

@lucdion lucdion commented Aug 28, 2018

Add methods to position a view between two other views, either horizontally or vertically.

New Methods:

  • horizontallyBetween(:UIView, and: UIView)
    Position the view between the two specified views horizontally. The method layout the view's left and right edges. The order of the reference views is irrelevant.
    Note that the layout will be applied only if there is horizontal space between the specified views.

  • horizontallyBetween(:UIView, and: UIView, aligned: VerticalAlign)
    Position the view between the two specified views horizontally and aligned it using the specified VerticalAlign. The view will be aligned related to the first specified reference view. Note that the layout will be applied only if there is horizontal space between the specified views.

  • verticallyBetween(:UIView, and: UIView)
    Position the view between the two specified views vertically. The method layout the view's top and bottom edges. The order of the reference views is irrelevant. Note that the layout will be applied only if there is vertical space between the specified views.

  • verticallyBetween(:UIView, and: UIView, aligned: HorizontalAlign)
    Position the view between the two specified views vertically and aligned it using the specified HorizontalAlign. The view will be aligned related to the first specified reference view. Note that the layout will be applied only if there is vertical space between the specified views.

See Readme for more information

@lucdion lucdion merged commit 1065ce8 into master Aug 28, 2018
@lucdion lucdion deleted the between branch August 28, 2018 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant