I'm storing the UITextView.text
as array in UserDefaults
.
let array = notesText.text
UserDefaults.standard.set(array, forKey: "notesKey")
UserDefaults.standard.synchronize()
I'm reading the array as:
let notesArray = UserDefaults .standard .object ( forKey: "notesKey" )
print( "Data: \( notesArray )" )
I want to dispaly the array with indexpath.row
in UITableView
.
I have a UITableview and onclick of cell it dispalys detailview on the detailview I have a navigation button onclick of it it displays another view where i have the uitextview,on clcik of savebutton it should save the text in uitextview and when i come back to this view i need the uitextview to display what was saved.
Could you help me do that?