I am creating 5 buttons dynamically in my project.
Now I want code for each of the dynamic buttons to move to the next screen when I click a button.
If you have sample example same like my requirement then please post here.
I know its very easy for drag and drop control to connect next form but I want to do that dynamically.
Code I have so far:
for (i = 1; i <= 5; i++) {
    UIButton *aButton = [UIButton buttonWithType:UIButtonTypeCustom];
    aButton.frame = CGRectMake(xCoord, yCoord, buttonWidth, buttonHeight);
    [
        aButton addTarget:self action:@selector(whatever:)    
        forControlEvents:UIControlEventTouchUpInside
    ];
    [scrollView addSubview:aButton];
    yCoord += buttonHeight + buffer;
}