dingding3w / dhguidepagehud Goto Github PK
View Code? Open in Web Editor NEW一键合成APP引导页,包含不同状态下的引导页操作方式,同时支持动态图片引导页和静态图片引导页;
License: MIT License
一键合成APP引导页,包含不同状态下的引导页操作方式,同时支持动态图片引导页和静态图片引导页;
License: MIT License
你好,我将你的欢迎页加在登录页面上,登录是要有状态栏的,欢迎页也出现了状态栏,怎么可以隐藏欢迎页的状态栏
我从网上找了一张gif图 拉近assets.xcassets
然后在appdelegate里
// 动态引导图片数组初始化
NSArray *imageNameArray = @[@"timg.gif",@"timg.gif"];
// 创建并添加引导页
DHGuidePageHUD *guidePage = [[DHGuidePageHUD alloc] dh_initWithFrame:self.window.frame imageNameArray:imageNameArray buttonIsHidden:YES];
guidePage.slideInto = YES;
[self.window addSubview:guidePage];
但是为什么我的gif图显示不出来 只有灰色的背景??
请问这个宏只是演示的时候用的吗?
能支持横屏的图片吗?能支持2x,3x不同屏幕使用不同的分辨率图片吗?
我的项目有TabBarController。我在首页导入你的框架的时候,我把[DHGuidePageHUD alloc] dh_initWithFrame:CGRectMake(0, 0, 屏幕的宽, 屏幕的高)。但是在运行的时候,还是漏出了TabBarController。请问这种情况怎么解决。
屏幕大小都不一样,怎么选择图片资源
你好,我用你的DHGuidePageHUD 静态图片方式集成了引导页,也能正常运行了,没报错,我的程序是用webview加载H5的,我在webview的前面引入了
// 设置APP引导页
if (![[NSUserDefaults standardUserDefaults] boolForKey:BOOLFORKEY]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:BOOLFORKEY];
// 静态引导页
[self setStaticGuidePage];
// 动态引导页
// [self setDynamicGuidePage];
// 视频引导页
// [self setVideoGuidePage];
}
引导页完点击体验进入了自己主页面,但依然保留你们demo跳转到hello界面顶部的bar,我如何清除这个bar呢?
有一个问题,就是ScrollView滑动比较快的时候,其CurrentPage的状态更新比较迟缓。
建考虑优化一下:
#pragma mark - ------------UIScrollView代理方方法------------
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
// 不在这里设置currentPage --- 因为当滑动比较快速的时候,就出现currentPage更新比较慢
// [self.imagePageControl setCurrentPage:page];
// 这里就不用四舍五入了,因为在scroll滚动减速完成时才执行(相当于scroolView滚动静止的那一刻),四舍五入和不四舍五入,效果都一样
int img_count = (int)self.imageArray.count;
int page = (int)(scrollView.contentOffset.x / scrollView.frame.size.width);
if (self.imageArray && page == img_count - 1 && self.slideInto == NO) {
[self buttonClick:nil];
}
if (self.imageArray && page < img_count - 1 && self.slideInto == YES) {
self.slideIntoNumber = 1;
}
if (self.imageArray && page == img_count - 1 && self.slideInto == YES) {
UISwipeGestureRecognizer * swipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:nil action:nil];
if (swipeGestureRecognizer.direction == UISwipeGestureRecognizerDirectionRight) {
self.slideIntoNumber++;
if (self.slideIntoNumber == 3) {
[self buttonClick:nil];
// [self handleSingleTapFrom];
}
}
}
}
// 这里也不能设置currentPage,状态无法及时更新
//- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
//{
// int page = (int)(scrollView.contentOffset.x / scrollView.frame.size.width);
// [self.imagePageControl setCurrentPage:page];
//}
// 2018-06-20 修改:新增一个代理方法,专门用来设置currentPage
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// 四舍五入,保证pageControl状态跟随手指滑动刷新
[self.imagePageControl setCurrentPage:(int)((scrollView.contentOffset.x / scrollView.frame.size.width) + 0.5f)];
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.