Implementing a dropdown in iOS.

The code can be found on github: https://github.com/kmdarshan/dropdown
This is an easy to use drop down implementation for iOS. You basically have to instantiate the trends table view and add it as a subview.
ImageImage
Also I have added a ORM called trend object to store your settings. Basically this needs to be set too.

NSMutableArray *arr = [[NSMutableArray alloc] init];
for (int i=0; i<10; i++) {
RDTrendObject *trendObject = [[RDTrendObject alloc] init];
[trendObject setSelected:NO];
[trendObject setName:[NSString stringWithFormat:@"index %d", i]];
[arr addObject:trendObject];
}
trendTableView = [[RDTrendsTableView alloc] initWithTrends:arr];
[trendTableView setFrame:CGRectMake(0, 100, self.view.frame.size.width-40, 0)];
[trendTableView setCenter:CGPointMake(self.view.center.x, trendTableView.center.y)];
[self.view addSubview:trendTableView];

In

Leave a Reply

Your email address will not be published. Required fields are marked *