I need to call a method I have defined as:
-(IBAction)next:(id)sender{
...
}
I want to call it in -[UIViewController viewDidload]
How can I call this method programmatically?
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.
selfis the object receiving the message, assuming-next:is defined in the same class as-viewDidLoad.next:is the name of the message (method).sender, pass the argumentnil, meaning “nothing”.If
-next:is defined in the App delegate but-viewDidLoadin some view controller, useto refer to the app delegate. So the statement becomes