Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying iOS 16 Programming for Beginners
  • Table Of Contents Toc
iOS 16 Programming for Beginners

iOS 16 Programming for Beginners - Seventh Edition

By : Ahmad Sahar, Craig Clayton
4.7 (50)
close
close
iOS 16 Programming for Beginners

iOS 16 Programming for Beginners

4.7 (50)
By: Ahmad Sahar, Craig Clayton

Overview of this book

With almost 2 million apps on the App Store, iOS mobile apps continue to be incredibly popular. Anyone can reach millions of customers around the world by publishing their apps on the App Store, which means that competent iOS developers are in high demand. iOS 16 Programming for Beginners, Seventh Edition, is a comprehensive introduction for those who are new to iOS, covering the entire process of learning the Swift language, writing your own app, and publishing it on the App Store. This book follows a hands-on approach. With step-by-step tutorials to real-life examples and easy-to-understand explanations of complicated topics, each chapter will help you learn and practice the Swift language to build your apps and introduce exciting new technologies to incorporate into your apps. You'll learn how to publish iOS apps and work with new iOS 16 features such as Mac Catalyst, SwiftUI, Lock Screen widgets, WeatherKit, and much more. By the end of this iOS development book, you'll have the knowledge and skills to write and publish interesting apps, and more importantly, to use the online resources available to enhance your app development journey.
Table of Contents (34 chapters)
close
close
1
Part I: Swift
11
Part II: Design
16
Part III: Code
26
Part IV: Features
32
Other Books You May Enjoy
33
Index

Adding model objects and configuring navigation

You now have a view that can be used to display the details of a restaurant. You’ll use this view as a cell in a SwiftUI list, which is a container that presents data in a single column. You’ll also configure model objects to populate this list. Follow these steps.

  1. Command + click on the HStack view and choose Embed in List to display a list containing five cells in the canvas, and remove the Spacer objects:

Figure 24.13: Editor area showing pop-up menu with Embed in List selected

  1. Verify that your code looks like this:
    struct ContentView: View {
       var body: some View {
          List(0 ..<5) { item in 
             VStack{
                Text("The Tap Trailhouse")
                   .font(.headline)
                Text("Brewery, Burgers, American")
                   .font(.subheadline)
                   .foregroundColor(.secondary)
                Image(systemName: "globe&quot...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
iOS 16 Programming for Beginners
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon