How can I access one particular section of a grouped tableview?
I would access a particular section of a grouped uitableview for changing its footer height in landscape mode.
If I use
self.tableView.sectionFooterHeight = 75.0;
in
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientatio开发者_开发百科n)orientation duration:(NSTimeInterval)duration
the footer height of all sections is changed, but I want a changing only in the first sections's footer height
You must do that in
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
When you do the rotation do an reloadData on the tableView and in the heightForFooterInSection
test for the particular section and for the UIDeviceOrientation
Good luck
Edit:
You get the device orientation
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
You have to implement
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
and maintain an array of all footer height's as instance variable.
精彩评论