lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

49289931: Action sheet causes LayoutConstraints warning #21120

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

Area: UIKit

Summary: Presenting a UIAlertController with style .actionSheet on an iPhone causes a LayoutConstraints warning to be logged.

Steps to Reproduce: Run the attached sample project on an iPhone device or simulator.

Expected Results: An action sheet should be displayed with no warnings.

Actual Results: The following warning is logged and a UIViewAlertForUnsatisfiableConstraints breakpoint is triggered: [LayoutConstraints] Unable to simultaneously satisfy constraints. ... ( "<NSLayoutConstraint:0x600001485a90 UIView:0x7fd59947db10.width == - 16 (active)>" )

Version/Build: iOS 12.2/16E227

Configuration/Notes: This does not occur on iOS 12.1, new with 12.2. Same warning with Objective-C and Swift 4.2

- Product Version: 12.2 Created: 2019-03-26T21:00:05.913100 Originated: 2019-03-26T00:00:00 Open Radar Link: http://www.openradar.me/49289931

atcnf3000 commented 5 years ago

my code (objective-C) has exactly the same error, has been working for years until I updated to 12.2. I tried all stack overflow suggestions with no help. ( my code is for enterprise app, nothing to do with your project, just kind of surprised that UIalertcontroller presenting in iPhone as action sheet to show up the warnings, sorry if this is not the right place to post such a warning----if you find a solution, I'd believe you can help my app too, thanks)

( "<NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>

hapiii commented 5 years ago

when I used "preferredStyle:UIAlertControllerStyleActionSheet"

output: [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( <NSLayoutConstraint:0x283574d20 UIView:0x15bb5cc50.width == -16> )

it happened in iPhone 7 ,but simulator is OK

EvanKaminsky commented 5 years ago

Seeing the same thing on an iPhone X running iOS 12.2 (16E227)

weitieda commented 5 years ago

my code (objective-C) has exactly the same error, has been working for years until I updated to 12.2. I tried all stack overflow suggestions with no help. ( my code is for enterprise app, nothing to do with your project, just kind of surprised that UIalertcontroller presenting in iPhone as action sheet to show up the warnings, sorry if this is not the right place to post such a warning----if you find a solution, I'd believe you can help my app too, thanks)

( "<NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>

Same warning(UIView width = -16) here... No idea what to do...

Spoonylein commented 5 years ago

Same here while presenting an alert controller an iPhone Xs Max simulator. Strange, as this constraints are set by UIKit.

lumanmann commented 5 years ago

Same here while presenting an action sheet alert controller an iPhone XR simulator.

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000031e5f90 UIView:0x7fd582417c50.width == - 16 (active)>

streem-ua commented 5 years ago

Same thing. Don't know what to do.

Jasperav commented 5 years ago

Unbelievable this still isn't fixed

sunkumar commented 5 years ago

I am also facing the same warning message not sure why it is coming.

I have present the UIAlertController without animation and warning got vanished.

controller.present(alertController, animated: false, completion: nil)
jasudev commented 4 years ago

This issue is still not resolved.

Mat-CauThon commented 4 years ago

Still not resolved

torburg commented 4 years ago

waiting for online wwdc 2020)))

mlucian commented 4 years ago

Confirmed still happening on iPhone pro 13.5 simulator , xCode 11.5 (11E608c)

Thanks

erikyuzwa commented 4 years ago

still not resolved. iPhone 11 simulator on XCode 12.0 beta 2 (12A6163b)

have come across this same exact error as well within an actionsheet cordova plugin I'm debugging.

MuhammadAAdam commented 4 years ago

BTW, it crashes with me when trying on iPad.

bmaloha commented 4 years ago

Still not resolved

andymedvedev commented 4 years ago

Still not resolved

KatkayApps commented 3 years ago

Unbelievable this still isn't fixed

why would Apple fix this? and the brilliant part is that I am seeing this on SwiftUI.. hahaha

huazuhao commented 3 years ago

still not resolved. still get the -16 error when alert is used.

acamill commented 3 years ago

I love this, been here for years

dcracker commented 3 years ago

OMG, still not resolved. Xcode 12.5.1, iPhoneX, iOS 14.4.2

kode54 commented 2 years ago

Still not resolved on iPadOS 15.3, affecting Landscape mode in another app.