启动图。引导页以及EAIntroView的使用

ios启动图:
1242 x 2208 (6plus)    R5.5位置
750 x 1334   (6)           R4.7位置
640 x 960     (4/4s)      2x位置
640 x 1136   (5/5s/5c) R4位置
 
 
 
网址:http://www.360doc.com/content/16/0320/20/10408243_543891288.shtml
 
 
EAIntroView 的使用:
 
// 自定义的view1,自定义的方法:createGuideViewWithImage 
            UIView *view1 = [self createGuideViewWithImage:[UIImage imageNamed:@"1-1"] labelImage:[UIImage imageNamed:@"1-2"]];
            EAIntroPage *page1 = [EAIntroPage pageWithCustomView:view1];
           
                        _intro = [[EAIntroView alloc] initWithFrame:self.view.bounds andPages:@[page1, page2 ,page3]];
 
                                   //设置代理
            [_intro setDelegate:self];
            [_intro showInView:self.view animateDuration:0.0];
           
            // 小圆点颜色
            _intro.pageControl.pageIndicatorTintColor = kColorCardBoaderColordedede;
            _intro.pageControl.currentPageIndicatorTintColor = kCircleCurrentPageColor;
           
            // 跳过按钮
            _intro.skipButton.frame = CGRectMake(SCREEN_WIDTH - AutoSize(10) - AutoSize(54), AutoSize(20), AutoSize(54), AutoSize(24));
            // 设置按钮距离位置(右侧还有label,设置的时候需要注意)
            _intro.skipButtonSideMargin = -AutoSize(20.f);
            _intro.skipButtonAlignment = EAViewAlignmentRight;
            [_intro.skipButton setImage:[UIImage imageNamed:@"skipButton_nor"] forState:UIControlStateNormal];
            [_intro.skipButton setImage:[UIImage imageNamed:@"skipButton_press"] forState:UIControlStateHighlighted];
                        
            // 调整不同设备的小圆点以及跳过按钮的位置
            if (iPhone4) {
                _intro.pageControlY = AutoSize(430.f);
                _intro.skipButtonY = AutoSize(460.f);
            } else if (iPhone5) {
                _intro.pageControlY = AutoSize(510.f);
                _intro.skipButtonY = AutoSize(540.f);
            } else {
                _intro.pageControlY = AutoSize(510.f);
                _intro.skipButtonY = AutoSize(560.f);
            }
            [defaults setObject:@"YES" forKey:kCacheKeyofIntroGuideKey];
            [defaults synchronize];
w1];
#pragma mark EAIntroViewDelegate代理方法
- (void)intro:(EAIntroView *)introView pageAppeared:(EAIntroPage *)page withIndex:(NSUInteger)pageIndex {
    // 引导页第三页的时候添加立即体验按钮
     // feelButton 自定义按钮
    if (pageIndex == 2) {
        [introView addSubview:self.feelButton];
        self.feelButton.hidden = NO;
    } else {
        self.feelButton.hidden = YES;
}
 
      显示出首页的方法
    [EAIntroView hideWithFadeOutDuration:0.3];
    }
}

转载于:https://www.cnblogs.com/xsyl/p/5779794.html

你可能感兴趣的:(启动图。引导页以及EAIntroView的使用)