UIButton

In this Swift code example, you will learn how to create a UIButton in Swift programmatically without using the storyboard or the interface builder. This is going to be a short tutorial with a very simple code example, but it will contain a lot of useful details like: Create UIButton programmatically in Swift, Position UIButton…

Read More Create UIButton Programmatically in Swift

In this Swift code example, you will learn how to disable UIButton. The quickest way to disable the button in Swift is to simply set the button’s isEnabled property to false. For example button.isEnabled = false.  Below is a complete code example in Swift that demonstrates how to: Create new UIButton, Position button within a view,…

Read More Disable UIButton Example in Swift

In this short tutorial, you will learn how to set a different font on UIButton in Swift programmatically. There are lots of different customization you can with UIButton. For example, you might be also interested to learn how to create UIButton and change its style, background color, tint color and make it call a function…

Read More Set UIButton Font Programmatically in Swift

In this tutorial, you will learn how to create UIButton programmatically. You will also learn how to do the basic customization of UIButton like setting button tint color, background color and making your button call a function when tapped. Create UIButton A new UIButton can be created of different types: ButtonType.custom, ButtonType.system, ButtonType.detailDisclosure, ButtonType.infoLight, ButtonType.infoDark,…

Read More Create UIButton in Swift Programmatically