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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -