Version | Commit Data | New In Version |
---|---|---|
1.0 | 2017.03.28 | The first Version |
1.1 | 2017.03.31 | -imageShowStatusArrayForSortOptionView: |
1.2 | 2017.07.13 | -setCurrentSelectedItem: |
SortOptionView *sortOptionView = [[SortOptionView alloc] init];
sortOptionView.dataSource = self;
sortOptionView.delegate = self;
[aSuperView addSubview: sortOptionView];
[sortOptionView show];
- (NSArray *)titleArrayForSortOptionView:(SortOptionView *)sortOptionView
{
return @[@"SortTitle1",@"SortTitle2",@"SortTitle3"];
}
- (NSArray *)imageShowStatusArrayForSortOptionView:(SortOptionView *)sortOptionView
{
return @[@"0",@"1",@"1"];
}
- (void)sortOptionView:(SortOptionView *)sortOptionView didClickedItemAtIndex:(NSUInteger)index sortOption:(SortOptionType)sortOption
{
switch (sortOption) {
case SortOptionNormal:
NSLog(@"SortOptionNormal");
break;
case SortOptionUp:
NSLog(@"SortOptionUp");
break;
case SortOptionDown:
NSLog(@"SortOptionDown");
break;
default:
break;
}
NSLog(@"index : %lu",index);
// do something by judge the index and sortOption
}
[sortOptionView setCurrentSelectedItem:0];
1.Run 'git clone'
git clone https://github.com/GGSDU/SortOptionView
2.Import the SortOptionView
folder to your project.
If you'd like to code with us and make the project better,contact me and join us.
- QQ : 337995545
- Email : [email protected]
- CSDN Blog