-
Book Overview & Buying
-
Table Of Contents
Swift Cookbook
By :
HTML started as a simple format for displaying web pages and links. Nowadays, this format has become very common and it is used everywhere. There are even frameworks such as PhoneGap that create applications with this file type.
In this recipe, we will create HTML using only strings; the main idea is to know about string manipulation. In this case, we will create the HTML code for a visiting card.
Open your Xcode and create a single view project called Chapter2 HTML.
Let's create HTML manually by following these steps:
Let's click on the storyboard and add the following layout:

Then, connect the text fields with the following properties on the view controller:
@IBOutlet var nameTextField: UITextField! @IBOutlet var addressTextField: UITextField! @IBOutlet var postCodeTextField: UITextField! @IBOutlet var phoneTextField: UITextField!
Link these properties with the corresponding text field on the view, and before creating an action button, we will...
Change the font size
Change margin width
Change background colour