iOS Tutorial

How To Make Swift Buttons Auto Layout To Full Fill Screen Width Responsively In iOS

In the previous article How To Add Constraints In Xcode 10 To Implement Auto Layout, we have learned what is swift constraints, how to use swift constraints to pin a UI component on the screen and make it auto layout, how to use constraints to align multiple UI components. And we also show a demo […]

How To Make Swift Buttons Auto Layout To Full Fill Screen Width Responsively In iOS Read More »

How To Change Swift Button Title Text, Background Color, Size, Position In Main Storyboard Use Xcode Attributes Inspector

When you develop the iOS app in swift, you can create and set UI component’s attributes both in swift source code and use Xcode attributes inspector. We have learned how to do it programmatically in the article How To Create Multiple Button And Add Button Action Function Programmatically In iOS Swift, this article will tell

How To Change Swift Button Title Text, Background Color, Size, Position In Main Storyboard Use Xcode Attributes Inspector Read More »

How To Use One Function To Process Multiple Button Click Event Programmatically In Swift

We have learnt how to use one IBAction function to process multiple button click event in article How To Use One IBAction For Multiple Buttons In Swift. In that example, we set a tag attribute value for each swift button, and then use that tag attribute value to distinguish which button is clicked in one

How To Use One Function To Process Multiple Button Click Event Programmatically In Swift Read More »

How To Set An Image As Swift Button Icon, Background Color And Background Image Example

We have learned how to set a button background image in the article How To Set Swift Button Background Image Example. Besides this, you can also set an image as a swift button’s icon, and set an image as the swift button background color. This article will show you how to do it and the

How To Set An Image As Swift Button Icon, Background Color And Background Image Example Read More »

How To Fix Swift Fatal Error: Unexpectedly Found Nil While Unwrapping An Optional Value

Swift optional variable is a variable that can have nil ( same to null ) value. And you do not need to initialize an optional variable before using it. If not initialized, the optional variable value is nil. It does not like none optional variable which you must assign an initial value before using it.

How To Fix Swift Fatal Error: Unexpectedly Found Nil While Unwrapping An Optional Value Read More »