Sample code for two-toned gradient outline for UIButton class (Swift)

Lauren Heller
May 14, 2021

--

Two-toned gradient achieved with custom UIButton class (Swift).
Sample code to achieve a two-toned gradient effect for your UIButton
The image above is the home view controller (HomeViewController.swift) for the Cool Cars app homework assignment for Devslopes Week 3.

Above is the code I used for my UIButton class in order to achieve the two-toned gradient outline as seen in the buttons in this photo.

This image is the home view controller for my homework assignment for Devslopes for week 3, the Cool Cars app.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Lauren Heller
Lauren Heller

Written by Lauren Heller

Join me on my journey as a developer📱 In my free time I’m a gamer 💻 watercolorist 🎨 gardener ☘ and baker 🍰

No responses yet

Write a response