objective c - Is there a way to change sectioned tableview to drilldown tableview? -
i have sectioned tableview plist wich array filled dictionaries. in app sections , cells shown on first view. need change this: sections have become cells(with names of sections). when press cell cells contained in section have appear.
is there way without rewriting code?
thanks , sorry noob question :o)
you need create 2 table view classes. 1 one holds section names, , other holds rows of each section. in first one, retrieve section names plist , populate rows in table accordingly. in - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath method need push view controller onto navigation stack(something this-provided in template code):
// navigation logic may go here. create , push view controller. <#detailviewcontroller#> *detailviewcontroller = [[<#detailviewcontroller#> alloc] initwithnibname:@"<#nib name#>" bundle:nil]; // ... // pass selected object new view controller. [self.navigationcontroller pushviewcontroller:detailviewcontroller animated:yes]; [detailviewcontroller release]; then other table view class populate reading in info plist corresponds tapped section. hope helps.
Comments
Post a Comment