Swift Developments is a hand-curated newsletter containing a weekly selection of the best links, videos, tools and tutorials for people interested in designing and developing their own apps using Swift.
Dark modes have become increasingly popular in recent years, but it might surprise you that implementing a dark mode isn’t as simple as setting the background for your view to pure black. In this post, @viditb takes a look at some of issues that can occur with pure black backgrounds on OLED screens and provides some pointers on how you can avoid these issues in your own designs.
In my experience both new and seasoned Swift developers alike can struggle to remember when to use
weak and when to use
unowned in their Swift code. If this sounds familiar, check out this article from @twannl which might help bring some clarity.
One of the often overlooked aspects of developing apps for Apple devices is the ability to provide non-visual feedback via Apple’s Haptic Feedback engine. If you’re looking to add haptic feedback to your own app then this article from @mecid is a good place to start.
In this step-by-step tutorial @naturaln0va shows you how implement your very own FileProvider extension to expose content stored on a remote server via the Files app on your iOS device.
A lot has been written about the coordinator pattern in recent months. In this article @p_montalto shows you how to use the coordinator pattern in conjunction with storyboards in such a way that you can leverage the major benefits of both.
Given the amount of debugging we have to do, it’s never a bad thing to brush up on LLDB and the Xcode debugging tools in general. Neel Bakshi walks you through some of Xcode’s and LLDBs more advanced features.
The need to uniquely identify certain values and objects is not uncommon in many code bases. @johnsundell looks at how to write your own unique identifiers for value types and uses Swift’s type system to throw a little type safety into the mix along the way. As a side note, make sure you also check out John’s new library Identity which has a more complete implementation.
Looking to start a new open source Swift framework of your own? Look no further than SwiftKit from @SvenTiigi which lets you easily generate the scaffolding for a cross-platform Swift Framework straight from the command line.
Hopefully you’ll be used to writing unit tests to test the basic functionality of your application but what about using them to test for memory leaks? In this talk, from @melbournecocoa @layoutsubviews shows you a simple technique to check for memory leaks in your unit tests.