Search Results

Search found 2 results on 1 pages for 'sagiftw'.

Page 1/1 | 1 

  • How can I pass information between 2 different View Controllers?

    - by sagiftw
    Hi, This is a simple question: I have 2 different view controllers, and each one has its own data stored in its .m file. I want to take a value, for instance, an integer value (int i=3;) that is declared in ViewController1 and pass it to ViewController2, so I will be able to use that value in the second view controller. Can anyone please tell me how to do it? Thanks in advance, Sagiftw

    Read the article

  • The delegate method "clickedButtonAtIndex:" is not called.

    - by sagiftw
    Hello everyone! I have created an alert view with two buttons using the following code: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle: title message: msg delegate:nil cancelButtonTitle:@"Replay" otherButtonTitles:@"Highscore", nil]; [alertView show]; I want to run some code when one of the buttons is clicked. In order to do so, I have added the following method to the delegate.m file: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex==0) //Run some code else //Other code } But this method is not called when I press either of the buttons! Can someone tell me why? Thanks in advance, Sagiftw

    Read the article

1