Dependency injection is one of the latest trends in iOS development, for better and more reusable code, cleaner architecture, testability and others. But adding a new dependency to a component means you have to refactor its initializer and all its calls, and we all know Xcode still can't help with that. Krzysztof Zabłocki suggests using protocol composition to avoid the need for that refactoring. Personally, I'm very curious to try this approach, as this is a problem I've met before.
iOS 10.3 introduced a way for an app to change its icon dynamically. While this sounds like it could open a lot of new possibilities, people are still struggling to find a good use-case for it. Most of the problems in doing that are caused by the limitations of the API, which seems to insist on showing the user an alert after the icon was changed. It's still a very new API, and I'm not aware yet of any live apps that use it. Many of the questions seem unanswered for now, and will probably remain that way until it maybe gets updated in a future release.
We've all seen
@escaping, but what about the less common of Swift's attributes? Jordan Morgan goes into details on some of them, providing some very good explanations. Now, if only that
popViewController(animated:) would be
@discardableResult again. 😄
Simply described as "a button that squishes when pressed", this UI component made by Patrick Balestra is inspired by Clips, the app that Apple launched last week. This is particularly interesting as it potentially shows the direction of iOS 11 UI being a little more dynamic in terms of touch down states which is rumoured to be something that might be changing.