Masonry icon indicating copy to clipboard operation
Masonry copied to clipboard

A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant

Open app111 opened this issue 7 years ago • 8 comments

New Issue Checklist

//source [self.tabBarController.view addSubview:self.pageAdView]; [self.pageAdView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.tabBarController.view); }]; .............................................. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <PageAdView: 0x10198c2b0; frame = (0 0; 0 0); clipsToBounds = YES; layer = <CALayer: 0x174425120>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.'

Issue Info

Info Value
Platform e.g. ios
Platform Version e.g. 10.2.1
Masonry Version e.g. 1.0.1

Issue Description

⚠️ Replace this with the description of your issue. ⚠️

app111 avatar Mar 28 '17 03:03 app111

Hi,

Do you find a solution ? I got the same error ...

Thank

martres avatar Apr 11 '17 16:04 martres

I have the same issue does anyone have a solution?

amita214 avatar Apr 12 '17 01:04 amita214

I guess the subviews layouts incorrect .

zhenyiyi avatar Apr 26 '17 03:04 zhenyiyi

I met the same issue when use SnapKit 4.0 in a swift 4.0 Project , Xcode version :9.0, iOS 11

lhp3851 avatar Sep 26 '17 01:09 lhp3851

same issue here. any solution?

JianboYan avatar Mar 14 '18 12:03 JianboYan

#185 I think can refer to ashare80's answer in this question。

zhouyu0616 avatar May 24 '18 08:05 zhouyu0616

Maybe you forgot to addsubview your label or something

sakubek avatar May 08 '19 06:05 sakubek

check if parent view is nil self.pageAdView in the Q

barylevy avatar Jun 24 '19 13:06 barylevy

it's right

app111 avatar Apr 28 '23 07:04 app111