I have a uiswitch view in a static table. I am trying to retrieve it via its tag in the viewdid load method. For some reason it always shows null. I do it with the viewWithTagMethod.
UISwitch* switch = (UISwitch*)[self.view viewWithTag:tag];
[switch setOn:[value boolValue] animated:YES];
Static table view contents are not loaded until after the super implementation of
viewWillAppear:animated:has been called. Move your code to a later point and you should be fine. Alternatively, just use an outlet.