AVPlayerViewController - No Auto Layout - Unable to simultaneously satisfy constraints.
As per this answer Unable to simultaneously satisfy constraints Warnings with AVPlayerViewController embedded in storyboard the solution seems to be to set showsPlayBackControls off on the PlayerController and then add it to the view.
Once you have an AVPlayer item, you can show the player controls again (assuming you need them).
I suspect that a valid AVPlayer item is needed in order for the player control constraints to be properly satisfied.
I had this exact same issue and managed to fix it by making this change. Good luck!
Unable to simultaneously satisfy constraints for view controller
My problem was that I was setting the height of the view after instantiating it, in the "viewDidLayoutSubviews".
I am using "Presentr" lib to instantiate a view easily.
My issue had nothing to do with constraints in the storyboard whatsoever.
I managed to fix the problem by specifying the height of my view BEFORE presenting with Presentr.
To do that, I did a protocol that forced my controller to have a "getHeight" func to get its height, allowing me to to something like that
let customType = PresentationType.custom(width: .custom(size: Float(self.view.frame.width)), height: .custom(size: editProfileVC.getHeight()), center: .center)
You can see here that, for the height, I'm using "editProfileVC.getHeight()"
I hope it can help others too.
Mixing storyboard and constraints in code
You can use layoutIfNeeded
to get the autolayout triggered and have your views the correct size.
But your yellow views almost looks like you could use a UICollectionView
to manage them...
Related Topics
How to Draw on an Image in Swift
Optional Binding Succeeds If It Shouldn'T
Programmatically Highlight Uibarbuttonitem
Build Video from Uiimage Using Swift
Thread 1:Exc_Bad_Access (Code = 1, Address = 0X30000008)
How to Implement Tableview Inside Tableview Cell in Swift 3
Ios9: Alternative to Uidevice.Currentdevice().Setvalue(...) to Force Orientation
Realm Accessed from Incorrect Thread
Swrevealviewcontroller - Rightviewcontroller
How to Run Multiple iOS Simulators at Once
Check If My iOS Application Is Updated
iOS Color to Transparent in Uiimage
Perform Segue from App Delegate Swift
How to Post on Twitter by Hiding Slcomposeviewcontroller *Tweetsheettweet Instance
Why Isn't Preferredcontentsize Used by iPhone 6 Plus Landscape
Xcode Doesn't Write Anything to Output Console
Get Each Line of Text in a Uilabel
iOS Are Methods Called by Delegates and Observers Executed on the Main Thread