May 2017 was not only rich in new UI/UX projects released on GitHub, and GitHub also released a couple of useful tools for developers. Today we will be looking at several UI components, animations, and tools written in Swift. Also, we are looking forward to the upcoming release of Swift 4.
Swift, ~2k stars this month
Pastel is a UI component that reproduces the gradient animation effect of the Instagram app and is built only on top of CoreAnimation. It has several default positions to start and finish a gradient (top right corner, bottom left corner, and so on) and a few default color schemes, but you can always assign your own values to the startPoint and endPoint properties as well as specify all colors for your gradient by calling the setColors function. This component looks good, with readable code and decent performance – use it without hesitation if you need this kind of effect in your application. Available through Carthage and Cocoapods.
Swift, ~900 stars this month
TLPhotoPicker adds image and video selection functionality similar to that found in the current version of the Facebook app. Under the hood, TLPhotoPicker uses only native Photos and PhotosUI frameworks. It provides unified access to the camera roll, selfies, panoramas, favorites, videos, live photos, and even custom albums on an iOS device. It’s highly customizable – you can even set up the whole UI part with your own XIB files. There’s also the ability to play back videos and live photos right from TLPhotoPicker. Assets can be fetched and loaded to cells asynchronously, which makes a huge (positive) impact on performance.
Where to use:
In every app where you deal with cameras and galleries.
Swift, ~900 stars this month
Swift and Kotlin are very similar languages (http://nilhcem.com/swift-is-like-kotlin/), which is why such a tool was destined to be developed sooner or later.
SwiftKotlin applies transformations to Swift code to produce Kotlin code that is as correct as possible. SwiftKotlin handles string transformations as well as some more complicated transformations like transforming guard statements to negative if statements, transforming properties, managing memory, and more. Of course, there are several restrictions for now (advanced memory management, exception handling, extensions, and other), but we hope SwiftKotlin’s creators will fix those as soon as possible.
When to use:
When you need to create an app for both Android and iOS but want to get all the benefits of having two native apps instead of one cross-platform app with some limitations.
Swift, ~1k stars this month
This topic deserves a separate article (maybe we’ll get back with one later). This project is a playground with code samples that illustrate how to use new Swift 4 features, such as:
swapAt method for collections
It’s a must-read for all who are going to develop in Swift in the near future. To work with this sandbox, you’ll need the latest Swift 4.0 snapshot from swift.org.