博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[翻译] ABCIntroView
阅读量:7023 次
发布时间:2019-06-28

本文共 1721 字,大约阅读时间需要 5 分钟。

ABCIntroView

ABCIntroView is an easy to use onboarding which allows you to introduce your users to the applicaiton before reaching the Main Screen.

ABCIntroView是一个简单易用的引导页。

To use the ABCIntroView please do the following:

你需要遵循以下几步来使用它:

  1. Add the follwing files found in the CLASSES folder to your project: 将以下几个文件拖到你的项目当中:
*ABCIntroView.h        *ABCIntroView.m
  1. Import the ABCIntoView file to your RootViewController. 将ABCIntoView文件引入到你的RootViewController当中。

  2. Create an ABCIntroView property and add the ABCIntroViewDelegate. 创建ABCIntroView属性以及添加ABCIntroViewDelegate代理。

  3. Add the following line of code to your ViewDidLoad: 然后将以下代码添加到你的ViewDidLoad:方法中。

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];    if (![defaults objectForKey:@"intro_screen_viewed"]) {        self.introView = [[ABCIntroView alloc] initWithFrame:self.view.frame];        self.introView.delegate = self;        self.introView.backgroundColor = [UIColor greenColor];        [self.view addSubview:self.introView];      }
  1. Add the ABCIntroView Delegate Method: 添加ABCIntroView代理方法
#pragma mark - ABCIntroViewDelegate Methods-(void)onDoneButtonPressed{    //    Uncomment so that the IntroView does not show after the user clicks "DONE"    //    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]    //    [defaults setObject:@"YES"forKey:@"intro_screen_viewed"];    //    [defaults synchronize];    [UIView animateWithDuration:1.0 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{        self.introView.alpha = 0;    } completion:^(BOOL finished) {        [self.introView removeFromSuperview];    }];}

If you have any questions about the project, please don't hesitate to ask.

如果有任何关于项目的疑问,不吝赐教。

Enjoy! :)

Adam

 

转载地址:http://vjvxl.baihongyu.com/

你可能感兴趣的文章
JS删除数组条目中重复的条目
查看>>
jQuery数组处理详解(转)
查看>>
hdu1412
查看>>
后仿真笔记 - ise 联合 modelsim
查看>>
python @property
查看>>
XCOJ 1168 (搜索+期望+高斯消元法)
查看>>
紫书 例题11-9 UVa 1658 (拆点+最小费用流)
查看>>
【天池大数据赛题解析】资金流入流出预测(附Top4答辩ppt)
查看>>
广告点击率预测 [离线部分]
查看>>
CodeForces 659F Polycarp and Hay
查看>>
Servlet客户请求的处理:HTTP请求报头HttpServletRequest接口应用
查看>>
ORACLE同义词使用
查看>>
pat 1014 1017 排队类问题
查看>>
Java常用系统变量收集
查看>>
常见负载均衡的优点和缺点对比(Nginx、HAProxy、LVS)
查看>>
Mac电脑C语言开发的入门帖
查看>>
上班两周
查看>>
洛谷P4242 树上的毒瘤
查看>>
导数和微分
查看>>
JQ实现树形菜单点击高亮
查看>>