UIAlertController's actionSheet gives constraint error on iOS 12.2 / 12.3 [duplicate]Swift default AlertViewController breaking constraintsUIAlertView's action sheet didn't separating cancel button from others in IOS 12.2Runtime Exception coming when show UIAlertController(actionsheet) iOS8Presenting UIAlertController ActionSheet in popover on iPhoneActionSheet Source View BarButtonItemActionSheet crash on iPad (camera button)UIAlertController ActionSheet Which Triggers A 2nd ActionSheetAttempt to present alertcontroller whose view is not in window hierarchyActionSheet lagsinputAccessoryView animating down when alertController (actionSheet) presentedWhat's the difference between preferredStyle: .alert and preferredStyle: .actionSheet?How to edit UIAlertController of type .actionSheet (font, background color)

What's this thing in a peltier cooler?

As a 16 year old, how can I keep my money safe from my mother?

What is my malfunctioning AI harvesting from humans?

How quickly could a country build a tall concrete wall around a city?

Acceptable to cut steak before searing?

How should an administrative assistant reply to student addressing them as "Professor" or "Doctor"?

What are good ways to improve as a writer other than writing courses?

What does Apple mean by "This may decrease battery life"?

Does this Foo machine halt?

How can I iterate this process?

Max Order of an Isogeny Class of Rational Elliptic Curves is 8?

Why should we care about syntactic proofs if we can show semantically that statements are true?

How do Mogwai reproduce?

I was asked to prove the Principle of Cauchy Induction

How to mark beverage cans in a cooler for a blind person?

If a Contingency spell has been cast on a creature, does the Simulacrum spell transfer the contingent spell to its duplicate?

show stdout containing n with line breaks

Is refreshing multiple times a test case for web applications?

Why did the RAAF procure the F/A-18 despite being purpose-built for carriers?

Looking for a new job because of relocation - is it okay to tell the real reason?

Team goes to lunch frequently, I do intermittent fasting but still want to socialize

How do I calculate the difference in lens reach between a superzoom compact and a DSLR zoom lens?

Does a code snippet compile? Or does it get compiled?

Trying to create a folder with date and time with a space



UIAlertController's actionSheet gives constraint error on iOS 12.2 / 12.3 [duplicate]


Swift default AlertViewController breaking constraintsUIAlertView's action sheet didn't separating cancel button from others in IOS 12.2Runtime Exception coming when show UIAlertController(actionsheet) iOS8Presenting UIAlertController ActionSheet in popover on iPhoneActionSheet Source View BarButtonItemActionSheet crash on iPad (camera button)UIAlertController ActionSheet Which Triggers A 2nd ActionSheetAttempt to present alertcontroller whose view is not in window hierarchyActionSheet lagsinputAccessoryView animating down when alertController (actionSheet) presentedWhat's the difference between preferredStyle: .alert and preferredStyle: .actionSheet?How to edit UIAlertController of type .actionSheet (font, background color)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








35
















This question already has an answer here:



  • Swift default AlertViewController breaking constraints

    1 answer



On iOS 12.2. while using UIAlertController's actionSheet Xcode, gives constraint error anyone having this problem



This same code runs on iOS 12.1 with no error



I have tested this code on Xcode 10.2 and 10.1



class ViewController: UIViewController 

let Click : UIButton =
let button = UIButton(type: UIButton.ButtonType.system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle("OK", for: .normal)
button.tintColor = UIColor.blue
button.addTarget(self, action: #selector(click(_:)), for: UIControl.Event.touchUpInside)
return button
()

override func viewDidLoad()
super.viewDidLoad()
view.addSubview(Click)
Click.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
Click.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true



@objc func click(_ sender: UIButton)
let optionMenu = UIAlertController(title: nil, message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)





[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:0x6000001b6ee0 UIView:0x7fe3b6513020.width == - 16 (active)>"
)

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


PS:



Just to make sure that the problem is on UIAlertController I remove everything and update the code as below but same error.



class ViewController: UIViewController 
override func viewDidLoad()
super.viewDidLoad()


override func viewDidAppear(_ animated: Bool)
super.viewDidAppear(animated)

let optionMenu = UIAlertController(title: "Test", message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)












share|improve this question
















marked as duplicate by Baum mit Augen Jun 13 at 21:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • i've tested your code, it runs perfectly. can you provide an actual screen shot

    – Sanad Barjawi
    Mar 27 at 8:05






  • 3





    suppose that its the 12.2 update issue then

    – Sanad Barjawi
    Mar 27 at 10:27






  • 5





    I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

    – Becky Hansmeyer
    Mar 29 at 19:44






  • 1





    Same issue with 12.2. 12.1 doesn't have this problem.

    – Alexey Chekanov
    Apr 7 at 23:59






  • 1





    Even with 12.3 as well, XCode 10.2.1

    – Rajan Maheshwari
    May 27 at 11:03


















35
















This question already has an answer here:



  • Swift default AlertViewController breaking constraints

    1 answer



On iOS 12.2. while using UIAlertController's actionSheet Xcode, gives constraint error anyone having this problem



This same code runs on iOS 12.1 with no error



I have tested this code on Xcode 10.2 and 10.1



class ViewController: UIViewController 

let Click : UIButton =
let button = UIButton(type: UIButton.ButtonType.system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle("OK", for: .normal)
button.tintColor = UIColor.blue
button.addTarget(self, action: #selector(click(_:)), for: UIControl.Event.touchUpInside)
return button
()

override func viewDidLoad()
super.viewDidLoad()
view.addSubview(Click)
Click.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
Click.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true



@objc func click(_ sender: UIButton)
let optionMenu = UIAlertController(title: nil, message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)





[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:0x6000001b6ee0 UIView:0x7fe3b6513020.width == - 16 (active)>"
)

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


PS:



Just to make sure that the problem is on UIAlertController I remove everything and update the code as below but same error.



class ViewController: UIViewController 
override func viewDidLoad()
super.viewDidLoad()


override func viewDidAppear(_ animated: Bool)
super.viewDidAppear(animated)

let optionMenu = UIAlertController(title: "Test", message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)












share|improve this question
















marked as duplicate by Baum mit Augen Jun 13 at 21:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • i've tested your code, it runs perfectly. can you provide an actual screen shot

    – Sanad Barjawi
    Mar 27 at 8:05






  • 3





    suppose that its the 12.2 update issue then

    – Sanad Barjawi
    Mar 27 at 10:27






  • 5





    I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

    – Becky Hansmeyer
    Mar 29 at 19:44






  • 1





    Same issue with 12.2. 12.1 doesn't have this problem.

    – Alexey Chekanov
    Apr 7 at 23:59






  • 1





    Even with 12.3 as well, XCode 10.2.1

    – Rajan Maheshwari
    May 27 at 11:03














35












35








35


13







This question already has an answer here:



  • Swift default AlertViewController breaking constraints

    1 answer



On iOS 12.2. while using UIAlertController's actionSheet Xcode, gives constraint error anyone having this problem



This same code runs on iOS 12.1 with no error



I have tested this code on Xcode 10.2 and 10.1



class ViewController: UIViewController 

let Click : UIButton =
let button = UIButton(type: UIButton.ButtonType.system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle("OK", for: .normal)
button.tintColor = UIColor.blue
button.addTarget(self, action: #selector(click(_:)), for: UIControl.Event.touchUpInside)
return button
()

override func viewDidLoad()
super.viewDidLoad()
view.addSubview(Click)
Click.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
Click.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true



@objc func click(_ sender: UIButton)
let optionMenu = UIAlertController(title: nil, message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)





[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:0x6000001b6ee0 UIView:0x7fe3b6513020.width == - 16 (active)>"
)

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


PS:



Just to make sure that the problem is on UIAlertController I remove everything and update the code as below but same error.



class ViewController: UIViewController 
override func viewDidLoad()
super.viewDidLoad()


override func viewDidAppear(_ animated: Bool)
super.viewDidAppear(animated)

let optionMenu = UIAlertController(title: "Test", message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)












share|improve this question

















This question already has an answer here:



  • Swift default AlertViewController breaking constraints

    1 answer



On iOS 12.2. while using UIAlertController's actionSheet Xcode, gives constraint error anyone having this problem



This same code runs on iOS 12.1 with no error



I have tested this code on Xcode 10.2 and 10.1



class ViewController: UIViewController 

let Click : UIButton =
let button = UIButton(type: UIButton.ButtonType.system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle("OK", for: .normal)
button.tintColor = UIColor.blue
button.addTarget(self, action: #selector(click(_:)), for: UIControl.Event.touchUpInside)
return button
()

override func viewDidLoad()
super.viewDidLoad()
view.addSubview(Click)
Click.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
Click.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true



@objc func click(_ sender: UIButton)
let optionMenu = UIAlertController(title: nil, message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)





[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:0x6000001b6ee0 UIView:0x7fe3b6513020.width == - 16 (active)>"
)

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


PS:



Just to make sure that the problem is on UIAlertController I remove everything and update the code as below but same error.



class ViewController: UIViewController 
override func viewDidLoad()
super.viewDidLoad()


override func viewDidAppear(_ animated: Bool)
super.viewDidAppear(animated)

let optionMenu = UIAlertController(title: "Test", message: "Choose Option", preferredStyle: .actionSheet)

let deleteAction = UIAlertAction(title: "Delete", style: .default)
let saveAction = UIAlertAction(title: "Save", style: .default)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)

optionMenu.addAction(deleteAction)
optionMenu.addAction(saveAction)
optionMenu.addAction(cancelAction)

self.present(optionMenu, animated: true, completion: nil)







This question already has an answer here:



  • Swift default AlertViewController breaking constraints

    1 answer







uialertcontroller swift5






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 27 at 11:04









Rajan Maheshwari

11k3 gold badges49 silver badges81 bronze badges




11k3 gold badges49 silver badges81 bronze badges










asked Mar 27 at 7:45









L03nL03n

2163 silver badges10 bronze badges




2163 silver badges10 bronze badges





marked as duplicate by Baum mit Augen Jun 13 at 21:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











marked as duplicate by Baum mit Augen Jun 13 at 21:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Baum mit Augen Jun 13 at 21:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • i've tested your code, it runs perfectly. can you provide an actual screen shot

    – Sanad Barjawi
    Mar 27 at 8:05






  • 3





    suppose that its the 12.2 update issue then

    – Sanad Barjawi
    Mar 27 at 10:27






  • 5





    I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

    – Becky Hansmeyer
    Mar 29 at 19:44






  • 1





    Same issue with 12.2. 12.1 doesn't have this problem.

    – Alexey Chekanov
    Apr 7 at 23:59






  • 1





    Even with 12.3 as well, XCode 10.2.1

    – Rajan Maheshwari
    May 27 at 11:03


















  • i've tested your code, it runs perfectly. can you provide an actual screen shot

    – Sanad Barjawi
    Mar 27 at 8:05






  • 3





    suppose that its the 12.2 update issue then

    – Sanad Barjawi
    Mar 27 at 10:27






  • 5





    I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

    – Becky Hansmeyer
    Mar 29 at 19:44






  • 1





    Same issue with 12.2. 12.1 doesn't have this problem.

    – Alexey Chekanov
    Apr 7 at 23:59






  • 1





    Even with 12.3 as well, XCode 10.2.1

    – Rajan Maheshwari
    May 27 at 11:03

















i've tested your code, it runs perfectly. can you provide an actual screen shot

– Sanad Barjawi
Mar 27 at 8:05





i've tested your code, it runs perfectly. can you provide an actual screen shot

– Sanad Barjawi
Mar 27 at 8:05




3




3





suppose that its the 12.2 update issue then

– Sanad Barjawi
Mar 27 at 10:27





suppose that its the 12.2 update issue then

– Sanad Barjawi
Mar 27 at 10:27




5




5





I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

– Becky Hansmeyer
Mar 29 at 19:44





I'm experiencing this same problem in Xcode 10.2 running iOS 12.2--guessing it's a bug! I'm planning to just ignore it.

– Becky Hansmeyer
Mar 29 at 19:44




1




1





Same issue with 12.2. 12.1 doesn't have this problem.

– Alexey Chekanov
Apr 7 at 23:59





Same issue with 12.2. 12.1 doesn't have this problem.

– Alexey Chekanov
Apr 7 at 23:59




1




1





Even with 12.3 as well, XCode 10.2.1

– Rajan Maheshwari
May 27 at 11:03






Even with 12.3 as well, XCode 10.2.1

– Rajan Maheshwari
May 27 at 11:03













1 Answer
1






active

oldest

votes


















8














It's a new bug in iOS versions:



  • 12.2

  • 12.3

  • 12.4

  • 13 beta 2

The only thing we can do is to file a bug report to Apple (just did that).



I'll try to update answer for a new version(s) of iOS when it come out.






share|improve this answer






















  • 2





    The bug continues in iOS 13 beta 2.

    – nugae
    Jun 27 at 9:05














1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









8














It's a new bug in iOS versions:



  • 12.2

  • 12.3

  • 12.4

  • 13 beta 2

The only thing we can do is to file a bug report to Apple (just did that).



I'll try to update answer for a new version(s) of iOS when it come out.






share|improve this answer






















  • 2





    The bug continues in iOS 13 beta 2.

    – nugae
    Jun 27 at 9:05















8














It's a new bug in iOS versions:



  • 12.2

  • 12.3

  • 12.4

  • 13 beta 2

The only thing we can do is to file a bug report to Apple (just did that).



I'll try to update answer for a new version(s) of iOS when it come out.






share|improve this answer






















  • 2





    The bug continues in iOS 13 beta 2.

    – nugae
    Jun 27 at 9:05













8












8








8







It's a new bug in iOS versions:



  • 12.2

  • 12.3

  • 12.4

  • 13 beta 2

The only thing we can do is to file a bug report to Apple (just did that).



I'll try to update answer for a new version(s) of iOS when it come out.






share|improve this answer















It's a new bug in iOS versions:



  • 12.2

  • 12.3

  • 12.4

  • 13 beta 2

The only thing we can do is to file a bug report to Apple (just did that).



I'll try to update answer for a new version(s) of iOS when it come out.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 25 at 13:29

























answered Jun 2 at 22:48









Andrei KonstantinovAndrei Konstantinov

3,3852 gold badges24 silver badges48 bronze badges




3,3852 gold badges24 silver badges48 bronze badges










  • 2





    The bug continues in iOS 13 beta 2.

    – nugae
    Jun 27 at 9:05












  • 2





    The bug continues in iOS 13 beta 2.

    – nugae
    Jun 27 at 9:05







2




2





The bug continues in iOS 13 beta 2.

– nugae
Jun 27 at 9:05





The bug continues in iOS 13 beta 2.

– nugae
Jun 27 at 9:05








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.





Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현