XV: First open (Updated version) App Wizard interface

Source: Internet
Author: User

When you open the app for the first time, you'll have a guide, such as how to use the app, what the core features are, or how new features are introduced in the new publication. It can be encapsulated into a class that inherits from UIView (Zwpushguideview), and in Xib the wizard content that you need to display, or plain code.

First check what the current version number is.

1         // Print out the contents of the Info.plist 2         Zwlog (@ "%@", [NSBundle mainbundle].infodictionary); 3         // It's printed on a number of groups . 4         Zwlog (@ "%@", [nsbundle mainbundle].infodictionary[@ "  Cfbundleshortversionstring"]);

Then use the class method to remove the comparison between the current version number and the new version number

1+ (void) Show2 {3mainbundle].infodictionary[@"cfbundleshortversionstring"]);4NSString *key =@"cfbundleshortversionstring";5     //get the version number of the current software6NSString *currenversion =[NSBundle Mainbundle].infodictionary[key];7     //get the version number stored in the sandbox8NSString *sandboxversion =[[Nsuserdefaults standarduserdefaults] stringforkey:key];9     if(![currenversion isequaltostring:sandboxversion]) {Ten         //Create Window OneUIWindow *window =[uiapplication Sharedapplication].keywindow; AZwpushguideview *guideview =[Zwpushguideview Guideview]; -Guideview.frame =window.bounds; - [window Addsubview:guideview]; the         //Store the latest version number version number - [[Nsuserdefaults standarduserdefaults] setvalue:currenversion Forkey:key]; -         //sync to Sandbox now - [[Nsuserdefaults standarduserdefaults] synchronize]; +     } -}

Finally, in the APPDELEGATE.M

// Show push Boot [Zwpushguideview show];

XV: First open (Updated version) App Wizard interface

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.