to normal string in iOS, There is not provide the facility of colorful
string in iOS, but have a class NSAttributeString which have provide
color of string facility. For formatting a part of a string, you need an
which specifies parts of the string formatted in different ways. In
this lesson we’ll learn how to work in attributed strings in Swift.
of all you Setup new project, and take different label in the View
Controller. Here I am taking six label and all label connects IBOutlet
in ViewController.swift file.
One variable is used too many time in the project file, then that types of variable is define as global. Some constant also define as global. here some of example to define constant. one make constant.swift file in your swift project,
Follow the steps to define global constant
go to project > New file > Make one constant file name as : Constant.swift.
define one Struct inside the Constant file, Struct which allow Structured data type and also provide storage of data. Struct define as below.