iOS start animation (AD)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.