第一次开机提示页面框架ealeksandrov/EAIntroView
来源:互联网 发布:华南师范大学网络 编辑:程序博客网 时间:2024/05/17 04:44
EAIntroView - simple iOS Introductions
This is highly customizable drop-in solution for introduction views. Some features (all features are optional):
- swipe from last page to close
- custom background for each page with cross-dissolve transition
- for each page - background, title image, title text, description and their separate Y positions
- custom background or color for whole view
- custom page control, skip button
This control is inspired by MYIntroductionView by Matthew York. Take it if you want right-to-left language support or autorotation and resize.
License: MIT.
CocoaPods
CocoaPods is the recommended way to use EAIntroView in your project.
- Simply add this line to your
Podfile
:pod 'EAIntroView', '~> 1.1.0'
- Run
pod install
. - Include with
#import "EAIntroView.h"
to use it wherever you need. - Subscribe to the
EAIntroDelegate
to enable delegate/callback interaction.
Manual installation
- Add
EAIntroPage
andEAIntroView
headers and implementations to your project (4 files total). - Include with
#import "EAIntroView.h"
to use it wherever you need. - Subscribe to the
EAIntroDelegate
to enable delegate/callback interaction.
How To Use It
Sample project have some examples of customization. Look in viewDidAppear
, uncomment some lines to see variants.
Step 1 - Build Pages
Each page created with [EAIntroPage page]
class method. Then you can customize any property, all of them are optional.
Simple
EAIntroPage *page1 = [EAIntroPage page];page1.title = @"Hello world";page1.desc = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
Custom
EAIntroPage *page3 = [EAIntroPage page];page3.title = @"This is page 3";page3.titleFont = [UIFont fontWithName:@"Georgia-BoldItalic" size:20];page3.titlePositionY = 220;page3.desc = @"Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.";page3.descFont = [UIFont fontWithName:@"Georgia-Italic" size:18];page3.descPositionY = 200;page3.titleImage = [UIImage imageNamed:@"femalecodertocat"];page3.imgPositionY = 100;
Step 2 - Create Introduction View
Once all pages have been created, you are ready to create the introduction view. Just pass them in right order in the introduction view.
Simple
EAIntroView *intro = [[EAIntroView alloc] initWithFrame:self.view.bounds andPages:@[page1,page2,page3]];
Custom
EAIntroView *intro = [[EAIntroView alloc] initWithFrame:self.view.bounds andPages:@[page1,page2,page3]];intro.backgroundColor = [UIColor colorWithRed:1.0f green:0.58f blue:0.21f alpha:1.0f]; //iOS7 orange intro.pageControlY = 100.0f; UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];[btn setBackgroundImage:[UIImage imageNamed:@"skipButton"] forState:UIControlStateNormal];[btn setFrame:CGRectMake((320-230)/2, [UIScreen mainScreen].bounds.size.height - 60, 230, 40)];[btn setTitle:@"SKIP NOW" forState:UIControlStateNormal];[btn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];intro.skipButton = btn;
Don't forget to set the delegate to the calling class if you are using delegation for any callbacks
[intro setDelegate:self];
Step 3 - Show Introduction View
[intro showInView:self.view animateDuration:0.0];
框架下载地址:https://github.com/ealeksandrov/EAIntroView
- 第一次开机提示页面框架ealeksandrov/EAIntroView
- js实现第一次打开页面弹出提示
- 隐藏Android第一次开机向导(提示气泡)
- springMVC框架中跳转页面传提示
- Android 情景模式->标准->默认通知提示音->第一次开机如何默认选中"无"
- 树莓派第一次开机
- 获取框架页的地址,添加离开页面提示
- 页面第一次打开即给用户异步提示之Asp.net Ajax延迟加载UpdatePanel
- FL2440第一次开机烧录
- 开机提示NTLDR MISSING
- 取消win2003开机提示
- 开机提示找不到系统盘
- [Python] 开机提示信息
- 关于第一次套上shiro框架遇到的页面css等失效现象
- 第一次做页面
- 第一次接触框架ThinkPHP
- js判断页面第一次加载,第一次加载
- 第一次使用提示工具utils
- POJ 1789 - Truck History(最小生成树)
- Apache之commons组件Lang包的常用方法实例
- nyoj-637-我和你
- _int64和long long的使用
- Linux操作系统文件系统基础知识详解
- 第一次开机提示页面框架ealeksandrov/EAIntroView
- jquery 动态为表单的input ,action赋值
- PHP curl函数使用详解
- zoj Candies
- 读取MAC地址
- PHP APC
- javascript undefined,null,undeclared
- 数字证书文件cer和pfx的区别
- cocos2d-x内存优化