5 iOS Libraries to Make Your App’s UI Really Pop

Dynamic switchers, stunning text fields, different animated views, and more!

Domenico Nicoli
Nov 29 · 4 min read
Photo by Raagesh C on Unsplash


Today, we’ll start with TKSwitcherCollection, a collection of animated switch controls.

It’s really easy to use — you just need to download and drop the in your project, and you’re ready!

At the moment, there are four different switches available:

  • TKSimpleSwitch → The traditional switch available on iOS but also on vertical.
  • TKExchangeSwitch → A switch that changes form in touch.
  • TKSmileSwitch → A switch with two values: sad and happy.
  • TKLiquidSwitch → A switch with a liquid-style animation.


CocoaTextField is a small, highly customizable text field library that can be used both programmatically and with storyboards.

You can, of course, customize some things, like inactive hint color, active hint color, default/focused background color, border color, and error color.

If you want to use it programmatically, an example of usage is below:

let v = CocoaTextField()
v.inactiveHintColor = UIColor(red: 145/255, green: 222/255, blue: 233/255, alpha: 1)
v.activeHintColor = UIColor(red: 777/255, green: 122/255, blue: 187/255, alpha: 1)
v.focusedBackgroundColor = UIColor(red: 200/255, green: 230/255, blue: 250/255, alpha: 1)
v.defaultBackgroundColor = UIColor(red: 250/255, green: 250/255, blue: 250/255, alpha: 1)
v.borderColor = UIColor(red: 239/255, green: 239/255, blue: 239/255, alpha: 1)
v.errorColor = UIColor(red: 231/255, green: 76/255, blue: 60/255, alpha: 0.7)
v.borderWidth = 3
v.cornerRadius = 14


EXPANDING COLLECTION is a library made in Swift that creates an animated material design UI card peek/pop controller.

In order to use this library, you have to import , and then create a UICollectionViewCell that inherits from . Then, add a FrontView and a BackView.

Now you can create a UIViewController that inherits from, register the cell created in the first step, and add the UICollectionViewDataSource.

More information about the implementation can be found in the official Github repository below.


doesn’t have a transition effect animation as the default when you scroll between items.

AnimatedCollectionViewLayout is a UICollectionViewLayout subclass that adds custom transitions and animations to your UICollectionView without affecting your existing code!

To use it, you need to import the library into your project. Then, you have to create an object, set its , and assign it to your .


Lastly, CollectionViewSlantedLayout is another subclass of the UICollectionViewLayout that allows the display of slanted cells in a UICollectionView.

This library works with every UICollectionView, horizontal and vertical with Dynamic cells height.

Among the configurable things, we find: slanting size, slanting direction, slanting angle, scroll direction, line spacing, item size, and the possibility to exclude the first or the last cell slanting.

Better Programming

Advice for programmers.

Domenico Nicoli

Written by

Backend Developer (C#, VB.NET, Microsoft SQL Server), iOS developer (Swift). Parma, Italy 🇮🇹 https://linkedin.com/in/domenico-nicoli-5738ba15a

Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade