MCLScrollViewSlider 1.0

MCLScrollViewSlider 1.0

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
Released最后发布2015年6月

MC Lee 维护。



  • 作者
  • MC Lee

MCLScrollViewSlider 是一个令人愉悦的自动滚动视图库,适用于 iOS。它基于 UICollectionView 构建。

选择 MCLScrollViewSlider 用于您的下一个项目,或者迁移现有项目——您会为此感到高兴的!

屏幕截图

Alt text

如何开始

  • 下载 MCLScrollViewSlider 并尝试提供的 iPhone 示例应用
  • 阅读“入门”指南
  • 查看文档,全面了解 MCLScrollViewSlider 中提供的所有 API

沟通

  • 如果您找到一个错误,并且可以提供可靠重现它的步骤,请打开一个问题。
  • 如果您想要贡献,请提交一个拉取请求。

Podfile

platform :ios, '7.0'

pod "MCLScrollViewSlider"

架构

MCLScrollViewSlider

  • MCLScrollViewSlider

MCLCollectionViewCell

  • MCLCollectionViewCell

MCLImageCache

  • NSData+MCLDataCache

使用

本地图片

  MCLScrollViewSlider *scrollView = [MCLScrollViewSlider      scrollViewSliderWithFrame:CGRectMake(0, 60, w, 180)
    images:images];
    [self.view addSubview:scrollView];

网络图片

  MCLScrollViewSlider *scrollView = [MCLScrollViewSlider      scrollViewSliderWithFrame:CGRectMake(0, 280, w, 180)
    imageURLs:imagesURL
    placeholderImage:[UIImage imageNamed:@"placeholder"]];
    [self.view addSubview:scrollView];

使用中更多选项

添加标签
  NSArray *labelTexts = @[@"1", @"2"];
  scrollView.labelTexts = labelTexts;
更改 autoScrollTimeInterval(默认值为 1.0 秒)
  scrollView.autoScrollTimeInterval = 2.0;
添加 didSelectItemWithBlock
  [scrollView didSelectItemWithBlock:^(NSInteger clickedIndex) {
            NSLog(@"%d",(int)clickedIndex); }];
更改 pageControlAliment(默认值为 MCLScrollViewSliderPageContolAlimentRight)
  scrollView.pageControlAliment = MCLScrollViewSliderPageContolAlimentCenter; (or MCLScrollViewSliderPageContolAlimentLeft)
更改 pageControlIndicatorTintColor
  scrollView.pageControlIndicatorTintColor = [UIColor redColor];
更改 pageControlCurrentIndicatorTintColor
  scrollView.pageControlCurrentIndicatorTintColor = [UIColor redColor];
更改标签文字颜色
  scrollView.labelTextColor = [UIColor redColor];
更改标签背景颜色
  scrollView.labelBackgroundColor = [UIColor redColor];
更改标签文字字号
  scrollView.labelTextFont = [UIFont systemFontOfSize:14];
更改标签高度
  scrollView.labelHeight = 40;

联系方式

电子邮箱: [email protected]

维护者

MCLee

许可证

MCLScrollViewSlider 可在 MIT 许可证下使用。更多信息请参阅 LICENSE 文件。