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

Demo crash when click Bacony Labels, and Margins #418

Open Huang-Libo opened 7 years ago

Huang-Libo commented 7 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 iOS (iPhone 6s Plus)
Platform Version 10.2
Masonry Version v1.0.2
Integration Method Masonry iOS Examples

Issue Description

1

Demo crash when click Bacony Labels. Crash info:

Masonry iOS Examples[8240:3732271] -[UILabel mas_lastBaseline]: unrecognized selector sent to instance 0x10031f150

2017-01-24 15 19 07

2

Demo crash when click Margins. Crash info:

Masonry iOS Examples[8244:3733905] -[MASExampleMarginView mas_topMargin]: unrecognized selector sent to instance 0x127d31030

2017-01-24 15 21 07
keepyounger commented 7 years ago

+1

Coder-ZJQ commented 7 years ago

I have this issue too... I think this may be caused by the below define comparison not worked...so the View+MASAdditions.m category won't implement some methods when source file is compiling, so caused the crash...

#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)

But I have checked the Deployment Target is 8.0 image and I has logged the result by:

NSLog(@"__IPHONE_OS_VERSION_MIN_REQUIRED:%d\n__IPHONE_OS_VERSION_MIN_REQUIRED>=80000:%@", __IPHONE_OS_VERSION_MIN_REQUIRED, (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) ? @"YES" : @"NO");

The log is :

__IPHONE_OS_VERSION_MIN_REQUIRED:80000
__IPHONE_OS_VERSION_MIN_REQUIRED>=80000:YES

It was strang,and i'm confused...

pimacun commented 7 years ago

Same issue to me.

0xxxD commented 7 years ago

+1

willwl commented 7 years ago

+1

oneGain commented 7 years ago

+1

zhihuihuashen commented 7 years ago

+1

senlinmuvs commented 7 years ago

+1111111111111111111111111

elbutchma commented 7 years ago

+1

Coder-ZJQ commented 7 years ago

It's related to the #353 issue. Just set the Pods -> Masonry -> iOS Deployment Target to the target what your project is. Here is the screenshot, wish to be helpful to you... image

szhy888 commented 7 years ago

problem solved