项目
在 GitHub 查看
cemolcay/CategorySliderView
关于
slider view for choosing categories. add any UIView type as category item view. Fully customisable
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文CategorySliderView
Horizontal or vertical slider view for choosing categories. Add any UIView type as category item view. Fully customisable
Demo

Install
Manual
Copy CategorySliderView.h/m files into your project.
CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
pod 'CategorySliderView', '~> 1.0.2'
Usage
UILabel *category1 = ......
UILabel *category2 = ......
UILabel *category3 = ......
...
CategorySliderView *sliderView = [[CategorySliderView alloc] initWithSliderHeight:60 andCategoryViews:@[category1, category2, category3] categorySelectionBlock:^(UIView *categoryView, NSInteger categoryIndex) {
UILabel *selectedView = (UILabel *)categoryView;
NSLog(@"\"%@\" cateogry selected at index %d", selectedView.text, categoryIndex);
}];
[self.view addSubview:sliderView];
you can add as many items as you want
UIView *newCategoryView = .....
[sliderView addCategoryView:newCategoryView];
Optional Properties
shouldAutoScrollSlider: scrolls to closest category item after dragging ends
shouldAutoSelectScrolledCategory: selects the closest category item after dragging ends
categoryViewPadding: padding between category item views
backgroundImage: background image for slider
探索相关项目
加载中…