Search icon CANCEL
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
iOS 13 Programming for Beginners

You're reading from   iOS 13 Programming for Beginners Get started with building iOS apps with Swift 5 and Xcode 11

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781838821906
Length 822 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Craig Clayton Craig Clayton
Author Profile Icon Craig Clayton
Craig Clayton
Ahmad Sahar Ahmad Sahar
Author Profile Icon Ahmad Sahar
Ahmad Sahar
Arrow right icon
View More author details
Toc

Table of Contents (33) Chapters Close

Preface 1. Section 1: Swift
2. Getting Familiar with Xcode FREE CHAPTER 3. Simple Values and Types 4. Conditionals and Optionals 5. Range Operators and Loops 6. Collection Types 7. Functions and Closures 8. Classes, Structures, and Enumerations 9. Protocols, Extensions, and Error Handling 10. Section 2: Design
11. Setting Up the Basic Structure 12. Building Your App Structure in Storyboard 13. Finishing Up Your App Structure in Storyboard 14. Modifying and Configuring Cells 15. Section 3: Code
16. Getting Started with MVC and Collection Views 17. Getting Data into Collection Views 18. Getting Started with Table Views 19. Getting Started with MapKit 20. Getting Started with JSON Files 21. Displaying Data in a Static Table View 22. Getting Started with Custom UIControls 23. Getting Started with Cameras and Photo Libraries 24. Understanding Core Data 25. Saving and Loading from Core Data 26. Section 4: Features
27. Getting Started with Dark Mode 28. Getting Started with Mac Catalyst 29. Getting Started with SwiftUI 30. Getting Started with Sign In with Apple 31. Testing and Submitting Your App to the App Store 32. Other Books You May Enjoy

Working with text

When using Storyboards, you modify attributes of a view using the Attributes inspector. In SwiftUI, you can modify either your code or the preview. As you will see, changing the code in ContentView.swift will immediately update the preview, and modifying the preview will update the code.

Let's learn how you can modify the text view in your project. Perform the following steps:

  1. In the preview, command + click the Lets Eat text on the screen. The structured editing popover will appear. Choose Show SwiftUI Inspector...:


  1. SwiftUI Inspector appears on screen. Change the Text modifier to The Tap Trailhouse. This is the name of a restaurant in Boston, and can be found in the Boston.json file:


  1. Change the Font modifier to Title:


  1. The code in ContentView.swift will be automatically updated, as shown:
 struct ContentView: View {
var body: some View {
...
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