I would like to reset the state of a UISwitch in a UIPopoverController from my MainViewController. I assume a simple
popoverView.switchName.on = NO;
wont do the job (as it doesnt seem to be working). Whats the best way to do this?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The UIPopoverController is the container for the content view controller that is shown inside the frame. I assume at some point you are calling initWithContentViewController
with a view controller that presents the content and that this view controller has the switchName property.
To access this view controller you can use the contentViewController property of the UIPopoverController. I imagine it will be something like: