From 3e8437ae559487362fae3525beb79c534c213a51 Mon Sep 17 00:00:00 2001 From: 单军华 Date: Thu, 12 Jul 2018 13:44:34 +0800 Subject: [PATCH] bug修复和功能优化 --- screendisplay/screendisplay/Classes/Helpers/欢迎页/LMJIntroductoryPagesHelper.m | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git "a/screendisplay/screendisplay/Classes/Helpers/\346\254\242\350\277\216\351\241\265/LMJIntroductoryPagesHelper.m" "b/screendisplay/screendisplay/Classes/Helpers/\346\254\242\350\277\216\351\241\265/LMJIntroductoryPagesHelper.m" new file mode 100755 index 0000000..ce57b34 --- /dev/null +++ "b/screendisplay/screendisplay/Classes/Helpers/\346\254\242\350\277\216\351\241\265/LMJIntroductoryPagesHelper.m" @@ -0,0 +1,44 @@ +// +// LMJIntroductoryPagesHelper.m +// iOSProject +// +// Created by windshan on 2017/12/29. +// Copyright �� 2017��� windshan. All rights reserved. +// + +#import "LMJIntroductoryPagesHelper.h" +#import "LMJIntroductoryPagesView.h" + +@interface LMJIntroductoryPagesHelper () + +@property (weak, nonatomic) UIWindow *curWindow; + +@property (strong, nonatomic) LMJIntroductoryPagesView *curIntroductoryPagesView; + +@end + +@implementation LMJIntroductoryPagesHelper + +static LMJIntroductoryPagesHelper *shareInstance_ = nil; ++ (instancetype)shareInstance +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + shareInstance_ = [[LMJIntroductoryPagesHelper alloc] init]; + }); + + return shareInstance_; +} + ++ (void)showIntroductoryPageView:(NSArray<NSString *> *)imageArray +{ + if (![LMJIntroductoryPagesHelper shareInstance].curIntroductoryPagesView) + { + [LMJIntroductoryPagesHelper shareInstance].curIntroductoryPagesView = [LMJIntroductoryPagesView pagesViewWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight) images:imageArray]; + } + + [LMJIntroductoryPagesHelper shareInstance].curWindow = [UIApplication sharedApplication].keyWindow; + [[LMJIntroductoryPagesHelper shareInstance].curWindow addSubview:[LMJIntroductoryPagesHelper shareInstance].curIntroductoryPagesView]; +} + +@end -- Gitblit v1.8.0