6

I'm getting this warning every time an UIAlertController action sheet is presented in a simulated phone. The code is nothing fancy.

let action1 = UIAlertAction(title: "Action 1", style: .default) { _ in }
let action2 = UIAlertAction(title: "Action 2", style: .default) { _ in }
let cancel = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
let alert = UIAlertController(title: "title", message: "message", preferredStyle: .actionSheet)

alert.addAction(action1)
alert.addAction(action2)
alert.addAction(cancel)

self.present(alert, animated: true)

I'm running Xcode 10.2 (10E125), Swift 5. The constraint seems out of my control but please advise if I'm doing something wrong.

screen capture

LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
WaitsAtWork
  • 295
  • 1
  • 13
  • Have you tried "reset to suggested constraints?" It appears that there are multiple view.width constraints. – Ron Mar 29 '19 at 01:02
  • Where might I find that? I don't see it as an option on the UIAlertController instance. – WaitsAtWork Mar 29 '19 at 13:59
  • Lower right corner of IB. See the screen shot in my answer. It's in the menu of the leftmost icon on the bottom. And, just for the record, I agree that IB seems to do some strange things while you're learning it. – Ron Mar 29 '19 at 14:08
  • Answer should be up. Hope it helps you. – Ron Mar 29 '19 at 14:13
  • I sort of have left & right confused in the previous comment. It's the rightmost icon. Sorry about that. – Ron Mar 29 '19 at 14:24
  • 3
    Clearly this is Apple’s bug. Let’s consolidate these repeated questions about it. File a bug report please. – matt Apr 14 '19 at 19:18
  • Bug reported has been submitted. I couldn't find a duplicate at the time of posting. – WaitsAtWork Apr 15 '19 at 20:11

1 Answers1

-7

Screenshot of IB showing the icons for constraint-manipulating menus. You can also click on the constraints themselves to edit or delete them.

Picture from IB

Check out the various drop-down menus.

Ron
  • 660
  • 1
  • 5
  • 10