Skip to content

It's simple and lightweigh drop-down list view. It uses UITableView but it will going to be support many other view types like UICollectionView

Notifications You must be signed in to change notification settings

serhatsezer/SimpleDropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

#SimpleDropdown

It's a simple and lightweigh drop-down list view. It uses UITableView under the hood. But later it will going to be support many other view types like UICollectionView and plain views. If you have any idea please send a pull request.

#Usage


NSArray *titles = @[@"Title 1", @"Title 2", @"Title 3", @"Title 4"];

SSSimpleDropdown *simpleDropDownExample = [[SSSimpleDropdown alloc] initListViewWithData:titles
                                                                parentView:self.view
                                                              locationView:self.mybutton];
simpleDropDownExample.listDelegate = self;

You can trigger drop-down toggle function with sender or any other gesture types.

- (IBAction)buttonTapped:(id)sender {
    [_simpleDropDownExample toggleDropDownWithAnimate:YES];
}
When if any drop-down item was tapped it will throw a delegate method. You can catch that cell information and title value.
- (void)didTapListItemWithIndexPath:(NSIndexPath *)indexPath title:(NSString *)title listView:(UITableView *)listView {
    NSLog(@"Item index path %@ and title %@ " ,indexPath, title);
}

About

It's simple and lightweigh drop-down list view. It uses UITableView but it will going to be support many other view types like UICollectionView

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published