save switch state even if the app gets restarted : I am trying to save the switch statement in objective-c but it will go back to the default state (which is off) whenever I reopen the app or go to another page and come back to the page that has switch

    @property (strong, nonatomic) IBOutlet UISwitch *switch1;
    @property (strong, nonatomic) IBOutlet UISwitch *switch2;
    @property (strong, nonatomic) IBOutlet UISwitch *switch3;

I have 3 switches and I have 3 IBOutlets for them. I have tried some codes to save the state but it did not work. How can I get them to work?

