Skip to content

Allow setting isActive default value. #88

Open
@larryonoff

Description

@larryonoff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions