-
Notifications
You must be signed in to change notification settings - Fork 1
Home
random ramblings edited this page Jul 15, 2013
·
2 revisions
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.
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];
Also I have added a ORM called trend object to store your settings. Basically this needs to be set too.