I have this code which will send me to another page but this only happens upon selecting a row in the picker.
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
NSString *urlString;
if (row == 0) {
urlString = @" ";
[self loadData:urlString];
}
However, I have an alert view which is suppose to execute this code when I click on a certain row. Each of my row has a different url thus, I need to do this if (row == 0) code.
Is there anyway I can add the code above to my alert code below?
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
}
}
Those two codes above are working perfectly fine. I am only figuring out whether is it even possible to add in the didSelectRow code into the alertview code. Please help!