| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Init your DKFilterView by constucting a DKFilterModel which contains your own selection value. There are three types,DK_SELECTION_SINGLE,DK_SELECTION_MULTIPLE and DK_SELECTION_PICK. Run Demo to see each's behavior.
NSArray *filterData = @[@"Apple",@"Pear",@"Mango",@"Orange",@"Lychee",@"Coconut"];
DKFilterModel *model = [[DKFilterModel alloc] initElement:filterData ofType:DK_SELECTION_SINGLE];
model.title = @"Click";
model.style = DKFilterViewStyle1;
DKFilterView *filterView = [[DKFilterView alloc] initWithFrame:self.view.frame];
[self.view addSubview:filterView];
[filterView setFilterModels:@[model]];Implement DKFilterViewDelegate to customize your own header view or click behavior.
- (NSInteger)getCustomSectionHeaderHeight;
- (DKFilterSectionHeaderView *)getCustomSectionHeader;
- (void)didClickAtModel:(DKFilterModel *)data;To install it, simply add the following line to your Podfile:
pod 'DKFilterView', :git => 'https://github.com/drinking/DKFilterView.git'
Since it's a beta version, DKFilterView now is not available through CocoaPods.
Drinking, pan49@126.com
DKFilterView is available under the MIT license. See the LICENSE file for more info.
| Back | FazBrowse Home | New Git URL |