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 support for multiplier and constant values for vertical and horizontal pins #4

Open
3 tasks
jduff opened this issue May 18, 2017 · 2 comments
Open
3 tasks

Comments

@jduff
Copy link
Owner

jduff commented May 18, 2017

ex.

// anchor with constant
open func constraint(equalToConstant c: CGFloat) -> NSLayoutConstraint
open func constraint(greaterThanOrEqualToConstant c: CGFloat) -> NSLayoutConstraint
open func constraint(lessThanOrEqualToConstant c: CGFloat) -> NSLayoutConstraint

// anchor with multiplier
open func constraint(equalTo anchor: NSLayoutDimension, multiplier m: CGFloat) -> NSLayoutConstraint
open func constraint(greaterThanOrEqualTo anchor: NSLayoutDimension, multiplier m: CGFloat) -> NSLayoutConstraint
open func constraint(lessThanOrEqualTo anchor: NSLayoutDimension, multiplier m: CGFloat) -> NSLayoutConstraint

// anchor with multiplier and constant
open func constraint(equalTo anchor: NSLayoutDimension, multiplier m: CGFloat, constant c: CGFloat) -> NSLayoutConstraint
open func constraint(greaterThanOrEqualTo anchor: NSLayoutDimension, multiplier m: CGFloat, constant c: CGFloat) -> NSLayoutConstraint
open func constraint(lessThanOrEqualTo anchor: NSLayoutDimension, multiplier m: CGFloat, constant c: CGFloat) -> NSLayoutConstraint
  • Pin horizontal and vertical anchors to constant value only dimensions can be pinned to constants
  • Pin horizontal, vertical and dimension anchors with multiplier (only dimensions have multiplier)
  • Pin horizontal, vertical and dimension anchors with multiplier and padding (only dimensions have multiplier)
@jduff
Copy link
Owner Author

jduff commented Jun 20, 2017

fixed by #18

@jduff jduff closed this as completed Jun 20, 2017
@jduff
Copy link
Owner Author

jduff commented Feb 13, 2018

It looks like you can use multipliers with constraints other than dimensions. It is likely you can use constants with others as well. Should add support for those.

@jduff jduff reopened this Feb 13, 2018
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

No branches or pull requests

1 participant