MTPopupWindow icon indicating copy to clipboard operation
MTPopupWindow copied to clipboard

Crashes on latest Xcode / iOS

Open ChrisWoodard opened this issue 10 years ago • 5 comments

Just rebuilt my project with the latest Xcode (Version 6.3.1 (6D1002)) and when I call

[MTPopupWindow showWindowWithHTMLFile:@"http://www..."];

the app bombs out with the exception:

* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: 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' *** First throw call stack: (0x22ce6fef 0x31234c8b 0x22ce6f35 0x23ae36cb 0x239a585b 0xa76b9 0xa60d5 0x908fb 0x2645256b 0x2650143b 0x263b6a91 0x2633138f 0x22cacfed 0x22caa6ab 0x22caaab3 0x22bf7201 0x22bf7013 0x2a4d6201 0x2639ba59 0x8bdf5 0x317c0aaf) libc++abi.dylib: terminating with uncaught exception of type NSException

Anyone got any suggestions, it's been fine up till now :-(

Thanks.

ChrisWoodard avatar Apr 23 '15 12:04 ChrisWoodard

Hi Chris,

Did you ever find a solution for this? I'm getting the same error. I submitted an app on April 25 with no issues, but today, getting the exact issue you described. Any help would be great. Thank you!

ngarrsion avatar May 05 '15 04:05 ngarrsion

Hi, I'm afraid I didn't resolve this problem, due to time constraints I just ended up using an alternative 3rd party library.

Chris.

ChrisWoodard avatar May 05 '15 06:05 ChrisWoodard

You cannot specify constraints on views that are not in the view hierarchy any more. This is an Auto Layout restriction.

Streek avatar May 11 '15 22:05 Streek

Hi,

Here what I did for fixed it, I change the multiplier on topc to 0.1f (in my case I put 6.0f to make the bullet button inside of box) or greater and that will work.

NSLayoutConstraint* topc = [NSLayoutConstraint constraintWithItem: closeBtn attribute: NSLayoutAttributeTop relatedBy: NSLayoutRelationEqual toItem: v attribute: NSLayoutAttributeTop multiplier: 6.0f constant: closeBtnOffset];

Hope that will help you @ChrisWoodard :)

airterjun avatar May 20 '15 06:05 airterjun

Thank you so much

f315al avatar Sep 22 '15 03:09 f315al