roberthein / TinyConstraints

Nothing but sugar.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is rightToSuperview offset the only value being inversed?

JonathanOh opened this issue · comments

public func rightToSuperview( _ anchor: NSLayoutXAxisAnchor? = nil, offset: CGFloat = 0, relation: ConstraintRelation = .equal, priority: LayoutPriority = .required, isActive: Bool = true, usingSafeArea: Bool = false) -> Constraint {
    let constrainable = safeConstrainable(for: superview, usingSafeArea: usingSafeArea)
    return right(to: constrainable, anchor, offset: -offset, relation: relation, priority: priority, isActive: isActive)
}

When looking at all other methods, rightToSuperview is the only one that inverses the offset value with -offset

Yes this was wrong, should be fixed now in 3.2.0. ✌️