I have two controllers – how can I call the functions in them from the console?
(main)>
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 only way I can figure out how to do this is by using the UIApplication sharedApplication class method and drilling down from there, which is pretty icky.
Unfortunately to access the window I had to add an
attr_reader :windowto my AppDelegate class to access this private variable and then drill down even further to get at the view controllers:Now you should be able to call any public methods on that view controller.