https://github.com/xiaohange/jqflowview
卡片式无限自动轮播图 ,无限/自动轮播,可自定义非当前显示view缩放和透明的特效等;喜欢❤️就star一下吧!
https://github.com/xiaohange/jqflowview
carousel-3d carousel-page customview flowview objective-c
Last synced: 11 months ago
JSON representation
卡片式无限自动轮播图 ,无限/自动轮播,可自定义非当前显示view缩放和透明的特效等;喜欢❤️就star一下吧!
- Host: GitHub
- URL: https://github.com/xiaohange/jqflowview
- Owner: xiaohange
- License: mit
- Created: 2017-05-05T09:08:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-05T09:33:17.000Z (about 9 years ago)
- Last Synced: 2025-05-24T15:03:27.460Z (about 1 year ago)
- Topics: carousel-3d, carousel-page, customview, flowview, objective-c
- Language: Objective-C
- Size: 2.53 MB
- Stars: 24
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JQFlowView
卡片式无限自动轮播图 ,无限/自动轮播,可自定义非当前显示view缩放和透明的特效等;喜欢❤️就star一下吧!




## Instalation
Add the JQFlowView source files to your project.
## Usage
```objective-c
_pageFlowView = [[JQFlowView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, (KScreenWidth - 84) * 9 / 16 + 24)];
_pageFlowView.backgroundColor = [UIColor whiteColor];
_pageFlowView.delegate = self;
_pageFlowView.dataSource = self;
_pageFlowView.minimumPageAlpha = 0.4;
_pageFlowView.minimumPageScale = 0.90;
_pageFlowView.orginPageCount = self.imageArray.count;
_pageFlowView.isOpenAutoScroll = YES;
_pageFlowView.autoTime = 3.0;
_pageFlowView.orientation = JQFlowViewOrientationHorizontal;
//初始化pageControl
UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, _pageFlowView.frame.size.height - 24 - 8, KScreenWidth, 8)];
_pageFlowView.pageControl = pageControl;
[_pageFlowView addSubview:pageControl];
[_pageFlowView reloadData];
[_scrollView addSubview:_pageFlowView];
```
***JQFlowViewDelegate*** 代理方法:
```
- (CGSize)sizeForPageInFlowView:(JQFlowView *)flowView
{
return CGSizeMake(KScreenWidth - 84, (KScreenWidth - 84) * 9 / 16);
}
- (void)didSelectCell:(UIView *)subView withSubViewIndex:(NSInteger)subIndex
{
NSLog(@"点击了第%ld张图",(long)subIndex + 1);
}
```
***JQFlowViewDatasource*** 代理方法:
```
- (NSInteger)numberOfPagesInFlowView:(JQFlowView *)flowView
{
return self.imageArray.count;
}
- (UIView *)flowView:(JQFlowView *)flowView cellForPageAtIndex:(NSInteger)index
{
JQIndexBannerSubview *bannerView = (JQIndexBannerSubview *)[flowView dequeueReusableCell];
if (!bannerView) {
bannerView = [[JQIndexBannerSubview alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 84, (KScreenWidth - 84) * 9 / 16)];
bannerView.layer.cornerRadius = 4;
bannerView.layer.masksToBounds = YES;
// bannerView.mainImageView.image = [bannerView.mainImageView.image stretchableImageWithLeftCapWidth:30 topCapHeight:30];
}
//在这里下载网络图片
[bannerView.mainImageView sd_setImageWithURL:[NSURL URLWithString:self.imageArray[index]] placeholderImage:nil];
// bannerView.mainImageView.image = self.imageArray[index];
return bannerView;
}
- (void)didScrollToPage:(NSInteger)pageNumber inFlowView:(JQFlowView *)flowView
{
NSLog(@"滚动到了第%ld页",pageNumber);
}
```
## Star
>iOS开发者交流群:446310206 喜欢就❤️❤️❤️star一下吧!你的支持是我更新的动力! Love is every every every star! Your support is my renewed motivation!
## Other
[JQTumblrHud-高仿Tumblr App 加载指示器hud](https://github.com/xiaohange/JQTumblrHud)
[JQScrollNumberLabel:仿tumblr热度滚动数字条数](https://github.com/xiaohange/JQScrollNumberLabel)
[TumblrLikeAnimView-仿Tumblr点赞动画效果](https://github.com/xiaohange/TumblrLikeAnimView)
[JQMenuPopView-仿Tumblr弹出视图发音频、视频、图片、文字的视图](https://github.com/xiaohange/JQMenuPopView)
## License
This code is distributed under the terms and conditions of the [MIT license](LICENSE).