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