App Development

High performance shadows for UIView

Published on: July 8, 2015

No app is truly complete without some subtle shadows. Especially now that Google's Material Design is showing us that shadows are cool again we need a way to properly add them in our apps. In my previous post I wrote about a way to create a custom UICollectionView layout. There was one problem with that post though, that shadows are incredibly heavy on the iPhone and scrolling stutters. So can we fix this? The answer is yes and the solution is (surprisingly) easy. A Google search led me to this Stackoverflow question about shadows. The solution I tried first was to simple...

Read more...

Creating a custom UICollectionViewLayout in Swift

Published on: July 7, 2015

Note: This blog post has been updated for Xcode 11 and Swift 5 👍🏼 If you’re looking to learn more about the new collection view layout techniques that were introduced in iOS 13, this post should contain everything you need. If you've ever built an iOS app that uses some kind of grid layout or displays a list in a way that doesn't fit a UITableView you have probably used a UICollectionView. This component allows for very simple grid layout creation and it even allows you to dynamically change layouts with beautiful animations. UICollectionView becomes even more powerful and flexible...

Read more...