How to create a favorite page

Out of curiosity how would one be able to create a favorite button and page? When someone presses a button that is shaped as an empty star it turns into a filled star (both images are stored in assets), when that button is filled the all the info is sent to a different tableview, until is someone presses the star again. I can imagine that core data is used a lot, but i am not sure how to do it.
Thank you

hi @samgusaapp1993,
You do not require Core Data for that, all you need to do is persist the state of favorite across the data which could be from a text file, a web API, a database on the device.

As regards to moving the item across to another tableView, you need to simply add or remove the item from the tableView’s dataSource.

This is a very common code task provided to developers applying for a position.



This topic was automatically closed after 166 days. New replies are no longer allowed.