Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
iOS Programming Cookbook

You're reading from   iOS Programming Cookbook Over 50 exciting and powerful recipes to help you unearth the promise of iOS programming

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781786460981
Length 520 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hossam Ghareeb Hossam Ghareeb
Author Profile Icon Hossam Ghareeb
Hossam Ghareeb
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

iOS Programming Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Swift Programming Language FREE CHAPTER 2. The Essentials 3. Integrating with Messages App 4. Working with Interface Builder 5. Working with UITableView 6. Animations and Graphics 7. Multimedia 8. Concurrency 9. Location Services 10. Security and Encryption 11. Networking 12. Persisting Data with Core Data 13. Notifications 14. App Search 15. Optimizing Performance

Using UIView via code or interface builder to build your own custom views


UIViews are the base building blocks of any iOS app. Think of LEGO; kids build their own buildings and blocks using tiny base blocks. The same logic is used in iOS; all UI screens you see are just a building of UIViews. All native/custom UI components extend from UIView; in other words, UIView is the base class of all UI components. To master iOS development and building the layout of any app, you have to be familiar with UIView.

Getting ready

We will see in this recipe how to create/use UIViews programmatically (hardcoded) or via interface builder. The fast and recommended way is to create your UIViews via interface builder (XIB files or Storyboards); but of course, in some cases, you will need to build custom UIViews, and in that case you will build your own custom UIViews programmatically.

How to do it...

  1. Go to Xcode and create a new iOS project with template Single View Application. Set the name of the project to UIViews...

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 €14.99/month. Cancel anytime
Banner background image