SnapKit / Masonry

Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout
MIT License
18.05k stars 3.14k forks source link

How can I get NSLayoutConstraint constant? #509

Open Beyond-Chao opened 6 years ago

Beyond-Chao commented 6 years ago

There is only setter method. But How can I get a specific NSLayoutConstraint`s constant? /**

MASViewConstraint.m file @property (nonatomic, assign) CGFloat layoutConstant;

pragma mark - Private

if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)

if (self.useAnimator) {
    [self.layoutConstraint.animator setConstant:layoutConstant];
} else {
    self.layoutConstraint.constant = layoutConstant;
}

else

self.layoutConstraint.constant = layoutConstant;

endif

}

How can I get it?