Tell if you have any problem in doing so.
A simple way to do it is to create a dictionary, with ID as key and a Bool value for favorite.
Then save as UserDefaults.
See a detailed example here:
https ://cocoacasts. com/ud-4-how-to-store-a-dictionary-in-user-defaults-in-swift
Don't forget to close the thread once solved. Good continuation.
Topic:
Programming Languages
SubTopic:
Swift
Tags: