How to create one more AppDelegate in Xcode 4.3.2?
-
30-06-2021 - |
Question
I am working in iPhone application, Using Xcode 4.3.2 tool to develop it, Using universal application to create this application, but only one Appdelegate (i am using this appdelegate for iPhone) show in the project navigator, but i want another one Appdelegate for iPad, How to create this? please help me
Thanks in Advance
Screen shots for your reference:
La solution
Use below code may be help you
id<UIApplicationDelegate> delegate = [[UIApplication sharedApplication] delegate];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
AppDelegate_iPad *appDelegate = (AppDelegate_iPad *) delegate;
else
AppDelegate_iPhone *appDelegate = (AppDelegate_iPhone *) delegate;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow