Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift Essentials

You're reading from   Swift Essentials Get up and running lightning fast with this practical guide to building applications with Swift

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781784396701
Length 228 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Bandlem Limited Bandlem Limited
Author Profile Icon Bandlem Limited
Bandlem Limited
Alex Blewitt Alex Blewitt
Author Profile Icon Alex Blewitt
Alex Blewitt
Arrow right icon
View More author details
Toc

Creating new views with interface builder


The easiest way of creating a custom view is to use interface builder to drag and drop the contents. This is typically done with a UITableView and a prototype table cell.

Creating a table view controller

Drag in the table view controller from the object library onto the main storyboard, and drag and drop from the tab bar controller to the newly created table view controller to create a relation segue called view controllers. (Segues are covered in more detail in the Storyboards, Segues, and Scenes section in Chapter 4, Storyboard Applications with Swift and iOS)

By default, the table view controller will have dynamic property content—that is, it will be able to display a variable number of rows. This is defined in the Table View section of the Attributes Inspector.

Note

There is an option for tables to have static content; a fixed number of rows in the table. This is sometimes useful when creating scrollable content that can be partitioned into slices...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image