G. Abhisek
Feb 3, 2021

--

override func encodeRestorableState(with coder: NSCoder) {

coder.encode(selectedSuperheroId.rawValue, forKey: "imageId")

super.encodeRestorableState(with: coder)

}

This function in the sample app attached saves the id.

--

--

G. Abhisek
G. Abhisek

Written by G. Abhisek

Software Developer(iOS), Speaker & Writer

No responses yet