Can't install UISwitch outside of controller class

The iphone program is set up in the Utility app model where you have a root view and two subheadings (mainViewController and flipsideViewController) that are outputs.

If I try to set the UISwitch on the rootViewControllerDidLoad (using [flipsideViewController.switchInstance setOn: YES]) it doesn't work.

This method works inside flipsideViewController, but not outside of it. Any idea why? I can pass other methods ...

Even if I pass the flipsideViewController method, which then executes the setOn method, it still doesn't work ...

Any ideas?

0


a source to share


1 answer


Just like the "sanity check" (as others have put it), have you ensured that your flipsideViewController variable is not null when you call the above code?



+1


a source







All Articles