Many apps start with the need to load ads or load animations for aesthetics.
In the first place, we refer to many online examples, all of which are in APPDELEGATE.M
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions
Implemented. Because it finishes executing to enter the view. We can add ads or animations here. Then, enter Rootviewcontroller.
1. Declare a uiimageview in AppDelegate.h
@property (strong,nonatomic) Uiimageview *adview;
2, APPDELEGATE.M implementation of related functions.
// You must give window a frame here, I am in this depressed for a long time Self.window = [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; [Self.window makekeyandvisible]; = [[Uiimageview alloc]initwithframe:cgrectmake (00-568)]; [AdView setimage:[uiimage imagenamed:@ "0.png"]; [Self.window Addsubview:splashview];
3, the Realization animation, is also very simple, does not have the nonsense.
Continue here, if you use the Uistoryboard design interface, how to jump to storyboard after the ad.
Uistoryboard *storyboard = [Uistoryboard storyboardwithname:@ "yourstoryboardname" Bundle:nil]; *mainviewcontroller = [Storyboard Instantiateinitialviewcontroller]; = Mainviewcontroller;
iOS start animation (AD)