ios - Setting UISwitch state in UIPopoverController -


i reset state of uiswitch in uipopovercontroller mainviewcontroller. assume simple

popoverview.switchname.on = no; 

wont job (as doesnt seem working). whats best way this? thank you.

the uipopovercontroller container content view controller shown inside frame. assume @ point calling initwithcontentviewcontroller view controller presents content , view controller has switchname property.

to access view controller can use contentviewcontroller property of uipopovercontroller. imagine like:

// assuming popoverview uipopovercontroller , type of  // view contorller pass initwithcontentviewcontroller yourviewcontroller yourviewcontroller * mycontroller = (yourviewcontroller*)popoverview.contentviewcontroller; mycontroller.switchname.on = no; 

Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

java - Why is BlockingQueue.take() not releasing the thread? -

jQuery Ajax Render Fragments OR Whole Page -