Masonry icon indicating copy to clipboard operation
Masonry copied to clipboard

How can I get NSLayoutConstraint constant?

Open Beyond-Chao opened this issue 6 years ago • 0 comments

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

  • Modifies the NSLayoutConstraint constant */
  • (void)setOffset:(CGFloat)offset;

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

#pragma mark - Private

  • (void)setLayoutConstant:(CGFloat)layoutConstant { _layoutConstant = layoutConstant;

#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?

Beyond-Chao avatar Feb 07 '18 13:02 Beyond-Chao