MCLScrollViewSlider 是一个令人愉悦的自动滚动视图库,适用于 iOS。它基于 UICollectionView 构建。
选择 MCLScrollViewSlider 用于您的下一个项目,或者迁移现有项目——您会为此感到高兴的!
platform :ios, '7.0'
pod "MCLScrollViewSlider"
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;
scrollView.autoScrollTimeInterval = 2.0;
[scrollView didSelectItemWithBlock:^(NSInteger clickedIndex) { NSLog(@"%d",(int)clickedIndex); }];
scrollView.pageControlAliment = MCLScrollViewSliderPageContolAlimentCenter; (or MCLScrollViewSliderPageContolAlimentLeft)
scrollView.pageControlIndicatorTintColor = [UIColor redColor];
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 文件。