How to center align the cells of a UICollectionView in Swift3.0?

Question or problem in the Swift programming language: Answer for Objective-C and Swift2.0: How to center align the cells of a UICollectionView? I usually would try to convert the Swift2.0 answer to the Swift3.0 solution, however the method: func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets { let edgeInsets = (screenWight – […]

Continue Reading

How to loop video with AVPlayerLooper

Question or problem in the Swift programming language: I try to loop a video in a TV OS app with the AVPlayerLooper because this should get rid of the pause/hicup when playing the video again. I watched the WWDC2016 video https://developer.apple.com/videos/play/wwdc2016/503/ and try to implement the code but it doesn’t loop. I have one PlayerViewController […]

Continue Reading