This is the code repository for iOS 14 Programming for Beginners - Fifth Edition, published by Packt.
Get started with building iOS apps with Swift 5.3 and Xcode 12
If you're a beginner looking to work and experiment with powerful iOS 14 features such as widgets and App Clips to create your own apps, this iOS programming guide is for you. The book offers a comprehensive introduction for experienced programmers who are new to iOS, taking you through the entire process of learning the Swift language, writing your own apps, and publishing them on the App Store.
This book covers the following exciting features:
- Get to grips with the fundamentals of Xcode 12 and Swift 5.3, the building blocks of iOS development
- Understand how to prototype an app using storyboards
- Discover the Model-View-Controller design pattern and how to implement the desired functionality within an app
- Implement the latest iOS features, such as widgets and App Clips
- Convert an existing iPad app into an Apple Silicon Mac app
- Design, deploy, and test your iOS applications with design patterns and best practices
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
if (test expression)
{
Statement upon condition is true
}
Following is what you need for this book: This book is for anyone who has programming experience but is new to Swift and iOS app development. Experienced programmers looking to explore the latest iOS 14 features will also find this book useful.
With the following software and hardware list you can run all code files present in the book (Chapter 1-26).
Chapter | Software required | OS required |
---|---|---|
1 to 26 | Xcode 12 or later | macOS 10.15 Catalina, macOS 11.0 Big Sur, or later |
26 | Apple Developer account | macOS 10.15 Catalina, macOS 11.0 Big Sur, or later |
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
Click on the following link to see the Code in Action:
- Page 423: Point 2 should be as follows:
The UITableViewDelegate method that is triggered when a user taps a row in the table view is tableView(_:didSelectRowAt:). Add this method between the extension's curly braces. It should look like the following:
//MARK: UITableViewDelegate
extension LocationViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt
indexPath: IndexPath) {
if let cell = tableView.cellForRow(at: indexPath) {
cell.accessoryType = .checkmark
selectedCity = manager.locationItem(at: indexPath)
tableView.reloadData()
}
}
}
When the user taps a row on the Locations screen, a checkmark will appear in that row, and the selectedCity property is assigned the corresponding LocationItem instance in the locations array. For example, if you tap the third row, the LocationItem instance with the values "Charleston" and "NC" is assigned to selectedCity.
Ahmad Sahar is a trainer, presenter, and consultant at Tomafuwi Productions, specializing in conducting training courses for macOS and iOS, macOS Support Essentials certification courses, and iOS Development courses. He is a member of the DevCon iOS and MyCocoaHeads online communities in Malaysia, and has conducted presentations and talks for both groups. In his spare time, he likes building and programming LEGO Mindstorms robots.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.