Hi all,
This question must be submitted a million times already I think but I just
can't find the answer.
I call PopUpView from SubView1 which has a picker view in it.
Below is the code when a selection is made in the picker view.
What I want is, to pass that value back to a label on Subview1.
Below is my code which gives a SIGABRT message.
What am I doing wrong?
Code:
-(NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return[list objectAtIndex:row];
}
-(void)pickerView:(UIPickerView *)thePickerview didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
NSString *string = [NSString stringWithFormat:@"Test %@",[list objectAtIndex:row]];
SubView1 *MyDelegate = [[UIApplication sharedApplication]delegate];
MyDelegate.lbl2.text = string;
}