I want to build a UIPickerView with ActionSheet. Some codes was found in Stack Overflow (link Problem in Datepicker and alertsheet)
Error occured when I tried to use it. It showed iRolegameAppDelegate was not defined.
-(IBAction)DatePickerView {iRolegameAppDelegate *appDelegate = (iRolegameAppDelegate *)[[UIApplication sharedApplication]delegate];
pickerViewDate = [[UIActionSheet alloc] initWithTitle:@"How many?"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
Is there anyone can tell me how to define it?
Thank you.
That is presumably your application delegate. You need to import the header file:
At the top of the .m file this method is in.
If that isnt your app delegate, then you are copying from an example you don’t understand.