API Design With Custom UIButton

  • Ease of use
  • Discoverability
  • Capabilities
  • Domain definition
  • Future proof

Flatten Button

State

enum State {    case regular    case loading}

Regular

Loading

Updating the title’s text & color

Update the UI

Constraints

calling setTitle:

Changing state

--

--

--

Software Developer, Tech enthusiastic, iOS #swift \\ Android #kotlin

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Let’s talk about the NEAR Protocol

My 3 Month Journey on Bangkit 2022

AWS:Introduction of Databases

How To Review Code For Vulnerabilities

Notarizing your Electron application with Electron Builder

Scalable Python Code with Pandas UDFs: A Data Science Application

Recon done right

C# Lesson 6 — Commenting Code

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
Ali Fakih

Ali Fakih

Software Developer, Tech enthusiastic, iOS #swift \\ Android #kotlin

More from Medium

Corner Radius for Desired Corners to UI Components in iOS ( Swift )

Singleton Design Pattern in Swift

UIKit No Storyboard: 3 ‘BASIC’ Techniques for Adapting Layouts and Designs

Continuations in Swift