I have a confession I want to begin with — before adopting any new technology or design pattern, I need to understand its benefits and problems.
While it may sound reasonable, this behavior was holding me back in some important areas over the years.
For example, it took me almost…
Those of you who are familiar with UIKit iOS 11 Drag and Drop API probably know that it dramatically improves UITableView and UICollectionView reordering user experience.
“Drag and Drop” become super straightforward, and the API handles most of the cases itself.
But what happens with SwiftUI? Do we have the…
Not only do iOS animations feel and look great, but they are also very easy to create. So how do I have the nerve to say that they are “messy”?
To understand that, let’s go back to the early days of iOS development — when we wrote code in Objective…
Old iOS developers remember the days when Objective C didn’t support blocks just yet. Async operations were a nightmare.
Blocks improved async operations, and when Swift appeared, closures were already natural for us. But to help us get through async calls, closures still have their pitfalls.
Fortunately, a new feature…
UICollectionView and UIViewControllerTransitionDelegate are with us for a long time already. Both of them solved some critical issues iOS development had with flexibility and customization of user experience.
What’s more interesting is that both of them provide a great example of how to create a flexible design pattern that lets…
In one of my previous articles, I mentioned how SPM (Swift Package Manager) changed the way I build and maintain my Code. I praised the deep integration Xcode 11 has with Swift Packages and how easy it is to create a tremendous modular Code.
But this “heaven” is not perfect…
If you make heavy use of tables and collection views, iOS 13 brought something great for you —
DiffableDataSource. If you’re not familiar with it, you’re more than welcome to read my (excellent!) tutorial about how to implement it into your project.
Anyway, in short —
DiffableDataSource is a way…
No doubt, navigation apps have changed our lives. We can hardly remember the days when we used to print maps or ask a passerby for directions. Heck, tell that to our kids, and they will think we lived in the stone age.
Navigation apps went a long way in improving…
Although we expect String slicing to be a common task in software development, many Swift developers find
substring to be complicated and frustrating.
Let’s see how substring works in other computer languages:
Objective-C: [str substringWithRange:NSMakeRange(2,6)]
Now let’s see how substring works in Swift: