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

Allow setting isActive default value. #88

Open
larryonoff opened this issue Mar 3, 2020 · 0 comments
Open

Allow setting isActive default value. #88

larryonoff opened this issue Mar 3, 2020 · 0 comments

Comments

@larryonoff
Copy link

TinyConstraints sets isActive default value for all functions to true. So as result all constraints are activated as soon as they created. But this's not efficient according apple documentation, see https://developer.apple.com/documentation/uikit/nslayoutconstraint/1526955-activate

Typically, using this method is more efficient than activating each constraint individually.

So I propose extending the library with something like

public enum TinyConstraintsConfiguration {
  public static var isActiveDefault: Bool = true
}

func anyTinyconstraintsFunction(..., isActive: Bool = TinyConstraintsConfiguration. isActiveDefault) -> Constraint

This should not be source breaking change.

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