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 17 Programming for Beginners
  • Table Of Contents Toc
  • Feedback & Rating feedback
iOS 17 Programming for Beginners

iOS 17 Programming for Beginners

By : Ian Lockett, Ahmad Sahar
4.6 (21)
close
close
iOS 17 Programming for Beginners

iOS 17 Programming for Beginners

4.6 (21)
By: Ian Lockett, Ahmad Sahar

Overview of this book

In a world with nearly 2 million apps on the App Store, the demand for skilled iOS developers has never been higher. "iOS 17 Programming for Beginners, Eighth Edition" is your gateway to this lucrative and dynamic field. This hands-on guide is tailored for those who are new to iOS and takes you on a journey from learning the Swift language to crafting your own app and seeing it thrive on the App Store. Our approach is hands-on and practical. Each chapter is designed to be a stepping stone in your development journey, providing step-by-step tutorials, real-life examples, and clear explanations of complex concepts. As you progress, you'll not only be skilled in Swift but also incorporate cutting-edge technologies into your apps. You'll learn how to publish your creations and harness the power of iOS 17 through a straightforward and easy to program example app divided into manageable parts. By the time you've completed this book, you'll possess the skills and knowledge to not only develop and publish captivating apps but also leverage online resources to continually enhance your app development prowess.
Table of Contents (34 chapters)
close
close
1
Part 1: Swift
11
Part 2: Design
16
Part 3: Code
26
Part 4: Features
32
Other Books You May Enjoy
33
Index

Removing rows from a table view

As you have learned in Chapter 14, Getting Started with MVC and Table Views, table view row deletion is handled by the tableView(_:commit:forRowAt:) method, which is one of the methods declared in the UITableViewDelegate protocol.

You’ll implement this method in the JournalListViewController class. Follow these steps:

  1. In the Project navigator, click the JournalListViewController file and add the following code to the JournalListViewController class after the table view data source methods:
    // MARK: - UITableViewDelegate
    func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
      if editingStyle == .delete {
        sampleJournalEntryData.journalEntries.remove(at: indexPath.row)
        tableView.reloadData()
      }
    }
    

    This will allow you to swipe left to display a Delete button, and when you tap the Delete button, the corresponding JournalEntry instance will be...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

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