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

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -