15th: The first time you open the (update version) APP Wizard interface, the app Wizard
The first time you open an APP, there will be a wizard, such as how to use the APP, what core functions are available, or introduction of new functions when a new version is released. It can be encapsulated into a class that inherits from UIView (ZWPushGuideView), and displayed in Xib, or pure code.
First, check the current version number.
1 // print info. content 2 ZWLog (@ "% @", [NSBundle mainBundle]. infoDictionary); 3 // The printed Array 4 ZWLog (@ "% @", [NSBundle mainBundle]. infoDictionary [@ "cfbundlepolicversionstring"]);
Then, use the class method to compare the current version number and the new version number.
1 + (void) show 2 {3 mainBundle]. infoDictionary [@ "cfbundle‑versionstring"]); 4 NSString * key = @ "cfbundle‑versionstring"; 5 // obtain the version number of the current software 6 NSString * currenVersion = [NSBundle mainBundle]. infoDictionary [key]; 7 // obtain the version 8 NSString * sandboxVersion = [[NSUserDefaults standardUserDefaults] stringForKey: key]; 9 if (! [CurrenVersion is1_tostring: sandboxVersion]) {10 // create window11 UIWindow * window = [UIApplication sharedApplication]. keyWindow; 12 ZWPushGuideView * guideView = [ZWPushGuideView guideView]; 13 guideView. frame = window. bounds; 14 [window addSubview: guideView]; 15 // store the latest version number 16 [[NSUserDefaults standardUserDefaults] setValue: currenVersion forKey: key]; 17 // synchronize to sandbox immediately 18 [[NSUserDefaults standardUserDefaults] synchronize]; 19} 20}
Finally in AppDelegate. m
// Display the push Guide [ZWPushGuideView show];