iOS Tutorial

How To Add, Insert, Move, Remove Sub View In iOS Swift

A swift view can have subviews, the subview can have it’s own subview also. So you can implement a view tree in swift, all the subviews are saved in a subview array, later added subview will override previously added subview. This article will show you an example to tell you how to add, insert, move […]

How To Add, Insert, Move, Remove Sub View In iOS Swift Read More »

How To Connect Storyboard UI Component To ViewController Class Code

When we develop iOS app use Xcode, we design the app GUI ( graphical user interface ) in Main.storyboard file. And the swift source code is edited in ViewController.swift file. But how to use swift source code in ViewController.swift file to modify storyboard UI component’s attributes or process UI component’s action event? This article will

How To Connect Storyboard UI Component To ViewController Class Code Read More »

,

How To Set iOS UIView Background With Customized Color Or Image In Swift

In the previous article How To Draw Rectangle View Use Swift In the iOS App we have learned how to draw a rectangle, how to set the rectangle background color, and how to add the rectangle as the subview of the iOS app’s main view. But when we set the rectangle background color, we use

How To Set iOS UIView Background With Customized Color Or Image In Swift Read More »

How To Fix Error ‘Value Of Optional Type Must Be Unwrapped To A Value Of Type’ In Swift

There are three kinds of variable declaration in swift programming. You can declare a swift variable as a variable (var name: String = “jerry”) that value can be changed in code, a constant ( let x:Int = Int(10) ) that value can not be changed, and an optional variable ( var x:Int? ) that value

How To Fix Error ‘Value Of Optional Type Must Be Unwrapped To A Value Of Type’ In Swift Read More »