Skip to content

Commit 59d6fd3

Browse files
committed
中秋祝福 - 去掉按钮,页面滑动消失
1 parent 72e1d16 commit 59d6fd3

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

Coding_iOS/Util/Manager/FunctionIntroManager.m

+23-8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#import "FunctionIntroManager.h"
1313
#import "EAIntroView.h"
1414
#import "SMPageControl.h"
15+
#import <NYXImagesKit/NYXImagesKit.h>
16+
1517

1618
@implementation FunctionIntroManager
1719
#pragma mark EAIntroPage
@@ -29,25 +31,28 @@ + (void)showIntroPage{
2931
return;
3032
}
3133
EAIntroView *introView = [[EAIntroView alloc] initWithFrame:kScreen_Bounds andPages:pages];
32-
introView.swipeToExit = NO;
33-
introView.scrollView.bounces = NO;
34+
introView.backgroundColor = [UIColor whiteColor];
35+
introView.swipeToExit = YES;
36+
introView.scrollView.bounces = YES;
3437

35-
introView.skipButton = [self p_skipButton];
36-
introView.skipButtonY = 20.f + CGRectGetHeight(introView.skipButton.frame);
37-
introView.skipButtonAlignment = EAViewAlignmentCenter;
38+
// introView.skipButton = [self p_skipButton];
39+
// introView.skipButtonY = 20.f + CGRectGetHeight(introView.skipButton.frame);
40+
// introView.skipButtonAlignment = EAViewAlignmentCenter;
3841

3942
if (pages.count <= 1) {
4043
introView.pageControl.hidden = YES;
4144
}else{
4245
introView.pageControl = [self p_pageControl];
43-
introView.pageControlY = 130;
46+
introView.pageControlY = 10.f + CGRectGetHeight(introView.pageControl.frame);
4447
}
4548
[introView showFullscreen];
4649
//
4750
[self markHasBeenShowed];
4851
}
4952

5053
+ (BOOL)needToShowIntro{
54+
// return YES;
55+
5156
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
5257
NSString *preVersion = [defaults stringForKey:kIntroPageKey];
5358
BOOL needToShow = ![preVersion isEqualToString:kVersion_Coding];
@@ -65,9 +70,19 @@ + (void)markHasBeenShowed{
6570

6671
#pragma mark private M
6772
+ (UIPageControl *)p_pageControl{
73+
UIImage *pageIndicatorImage = [UIImage imageNamed:@"intro_dot_unselected"];
74+
UIImage *currentPageIndicatorImage = [UIImage imageNamed:@"intro_dot_selected"];
75+
76+
if (!kDevice_Is_iPhone6 && !kDevice_Is_iPhone6Plus) {
77+
CGFloat desginWidth = 375.0;//iPhone6 的设计尺寸
78+
CGFloat scaleFactor = kScreen_Width/desginWidth;
79+
pageIndicatorImage = [pageIndicatorImage scaleByFactor:scaleFactor];
80+
currentPageIndicatorImage = [currentPageIndicatorImage scaleByFactor:scaleFactor];
81+
}
82+
6883
SMPageControl *pageControl = [SMPageControl new];
69-
pageControl.pageIndicatorImage = [UIImage imageNamed:@"banner__page_unselected"];
70-
pageControl.currentPageIndicatorImage = [UIImage imageNamed:@"banner__page_selected"];
84+
pageControl.pageIndicatorImage = pageIndicatorImage;
85+
pageControl.currentPageIndicatorImage = currentPageIndicatorImage;
7186
[pageControl sizeToFit];
7287
return (UIPageControl *)pageControl;
7388
}

0 commit comments

Comments
 (0)