@interface Pjxpushguideview:uiview
+ (instancetype) Guideview;
+ (void) show;
@end
#import "PJXPushGuideView.h"
@implementation Pjxpushguideview
+ (Instancetype) guideview{
Load Xib
Pjxpushguideview *guideview = [[[NSBundle Mainbundle]loadnibnamed:nsstringfromclass (self) owner:nil Options:nil] Lastobject];
Guideview.backgroundcolor = [Uicolor colorwithred:49.0/255.0 green:49.0/255.0 blue:49.0/255.0 alpha:0.75];
return guideview;
}
-(Ibaction) Remove: (ID) Sender {
[Self removefromsuperview];
}
+ (void) show
{
Nsdictionary *info = [[NSBundle mainbundle]infodictionary];
NSString *key = @ "cfbundleshortversionstring";
NSString * CurrentVersion = [info objectforkey:key];
NSString *sanboxversion = [[Nsuserdefaults standarduserdefaults] stringforkey:key];
if (![ CurrentVersion Isequaltostring:sanboxversion]) {
Pjxpushguideview *pushview = [Pjxpushguideview Guideview];
Pushview.frame = [UIApplication sharedapplication].keywindow.bounds;
[[UIApplication Sharedapplication].keywindow Addsubview:pushview];
[[Nsuserdefaults Standarduserdefaults] setobject:currentversion Forkey:key];
[[Nsuserdefaults standarduserdefaults] synchronize];
}
}
@end
Then implement the control layout in Pjxpushguideview.xib
Guide page Implementation Code--ios