From the course: Learning Realm for iOS App Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Delete notes

Delete notes - iOS Tutorial

From the course: Learning Realm for iOS App Development

Start my 1-month free trial

Delete notes

- [Instructor] When we have a look at our Notes Manager and scroll all the way down to the bottom, then you can see that there is only one function that still needs implementation, which is the deleteNote function, that receives one parameter, and this is just a note that we actually want to delete. And the code that is going to trigger this function is in note table view controller. So let's trod down here a little bit. And as you can see, we have the standard implementation of the table view commit editing style for row and index path. And this is a very easy way to delete items from a table view. We are checking if the editing style is equal to delete. We are getting this editing style here as a parameter in this delegate function. And if it is equal to delete then we can choose a note object to delete by getting it from our notes array using the index path end row property. So this is all there is to it, nothing fancy. And then, we're using our notes manager shared object and we…

Contents