ios - Keeping state of UISwitch in TableViewCell: Swift -
i have issue, have tableview setup, users can add , delete new items can check them in , out. mean that, every cell added there comes uiswitch in cell user can turn on , off. "on" being checked in , "off" being checked out.
so, that, new programming , know how save state(whether off or on) of uiswitch every time user leaves application switch stays same. thank help.
current code: current cell code
if new ios development,nsuserdefaults easier use.just save data this:[[nsuserdefaults standarduserdefaults] saveobject:data forkey:@""];
and read data this:[[nsuserdefaults standarduserdefaults] objectforkey:@""]
Comments
Post a Comment