Recreating the ever-popular duotone look from Spotify’s branding

Image for post
Image for post
Duotone with an extra gradient effect.

Back in 2015, Spotify went through a rebranding effort that involved a much flatter design along with bright, bold, and complementary colors. This new branding style extended throughout the service, including things like promo material and playlist cover art. To get the desired look, they used something called a duotone effect on their imagery.

In this piece, we’ll look at how we can recreate that effect using CoreImage in iOS. Thankfully, Apple was quite faithful to industry techniques for photo manipulation when they built the CoreImage library. …


Do your text views show…?

Image for post
Image for post

One of the challenges you might encounter when working with UITextViews is that they don’t provide a straightforward way to detect whether or not they are displaying truncated text.

With a UILabel you can check for truncation by calculating the size of the text within the label and comparing that with the bounds of the label itself. If the text extends beyond the bounds then it’s being displayed as truncated.

The challenge with UITextView is that, by design, it can hold text that is far larger than its bounds.

This is the essence of how a scrolling text view operates. That feature breaks our ability to quickly check for truncation, so to begin with, we need to work with a textview that has scrolling disabled. …


Become a more effective and empathetic reviewer

Image for post
Image for post
©Asana https://blog.asana.com/2016/12/7-ways-to-uplevel-your-code-review-skills/

Reviewing code is an daily occurrence for developers. It can be a humbling learning experience, but it can also turn into an egocentric process. Over the last few years I’ve learned some best practices, either through personal experience or excellent advice from peers, that have helped me to become a more effective and empathetic reviewer. I wanted to share some of this information, in the hopes that it will help others. This short post is broken into two main parts: 1. getting the best feedback on your work and 2. providing great reviews for your peers.

Structuring Your PR’s to Make Their Life Easy

Image for post
Image for post
@iamdeveloper https://twitter.com/iamdevloper/status/397664295875805184

Avoid massive changelogs

  • Keep it small — under 300 lines of changes, if possible. …

About

Alex Persian

iOS engineer @ Spotify

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store