Skip to content

vivfer/PFCarouselView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PFCarouselView

实现图片轮播功能

说明

PFCarouselView 是一款简单接入便可实现新闻客户端轮播图的开源库。开发者可使用代理或代码块的方式来对轮播图进行设置。本库具备扩展性好,使用简单,后期容易维护的特点。

代码展示

//创建一个轮播图
carouselView = [[PFCarouselView alloc] initWithFrame:CGRectMake(0, 100, 320, 200) animationDuration:2 delegate:self];

//设置页数
[carouselView numberOfPagesInCarouselViewUsingBlock:^NSInteger(PFCarouselView *carouselView){ return viewsArray.count; }];

//设置视图
[carouselView contentViewAtIndexUsingBlock:^UIView *(PFCarouselView *carouselView, NSInteger index) { return viewsArray[index]; }];

运行效果展示

image

About

实现图片轮播功能

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 81.5%
  • Ruby 18.5%