SnapKit / Masonry

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

Returning block that lives on the local stack #561

Open uestchang opened 5 years ago

uestchang commented 5 years ago

New Issue Checklist

🚫 If this template is not filled out your issue will be closed with no comment. 🚫

Issue Info

Info Value
Platform e.g. ios
Platform Version e.g. 8.0
Masonry Version e.g. 1.0.1
Integration Method e.g. manually

Issue Description

I try to use Masonry in my project ,However , there are some errors when i Build , and the error is: /Users/.../Masonry/View+MASAdditions.m:85:12: Returning block that lives on the local stack My Xcode version is 10.0 ,can any guys help me?

Ververtom commented 5 years ago

Yes, I dragged the file to my project, then after I compiled the project, it had an error report "Returning block that lives on the local stack" in MASCompositeConstraint.m in line 52 return ^id(CGFloat multiplier)
I finally found that it's related to ARC,if I set Objective-C Automatic Reference Counting NO, this error appear