Using Autolayout Visual Format with Swift?

this works for me with no error: let bar:[AnyObject]! = NSLayoutConstraint.constraintsWithVisualFormat( nil, options: NSLayoutFormatOptions(0), metrics: nil, views: nil) update the line above may not be compiled since the 1st and 4th parameters cannot be optionals anymore. syntactically those have to be set, like e.g. this: let bar:[AnyObject] = NSLayoutConstraint.constraintsWithVisualFormat(“”, options: NSLayoutFormatOptions(0), metrics: nil, views: [“”: … Read more

Unable to simultaneously satisfy constraints Warnings with AVPlayerViewController embedded in storyboard

In fact, I think it’s bug on Apple side. I found a workaround : set showsPlaybackControls to YES after the AVPlayerViewController.player have been set. I modify your sample with the following lines and no more Constraint error appears : @interface ViewController () @property(weak, nonatomic) AVPlayerViewController * playerViewController; @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; … Read more

UICollectionView iOS 9 issue on project with RTL languages support

I was in a similar situation and found a solution for this. If you are using swift, add the following snippet to your project, and it will make sure that the bounds.origin always follows leading edge of the collection view. extension UICollectionViewFlowLayout { open override var flipsHorizontallyInOppositeLayoutDirection: Bool { return true } } If you … Read more