启动图。引导页以及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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值