Hi,
I'm using the footer view of a UITableView to house 2 buttons. However, the scrolling up and done seems to be rather choppy. The code I'm using at the moment is:
Code:
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if(footerView == nil) {
footerView = [[UIView alloc] init];
}
if(section == 4) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setFrame:CGRectMake(10, 5, 115, 40)];
[button setTitle:@"Where am I?" forState:UIControlStateNormal];
[button setBackgroundColor: [UIColor clearColor]];
[button addTarget:self action:@selector(showInMapApp:) forControlEvents:UIControlEventTouchUpInside];
/*UIButton *makeContact = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[makeContact setFrame:CGRectMake(135, 5, 150, 40)];
[makeContact setTitle:@"Create new contact" forState:UIControlStateNormal];
[makeContact setBackgroundColor: [UIColor clearColor]];
[makeContact addTarget:self action:@selector(createNewContact:) forControlEvents:UIControlEventTouchUpInside];*/
[footerView addSubview:button];
//[footerView addSubview:makeContact];
return footerView;
[footerView release];
} else
return nil;
[footerView release];
}
I'd appreciate any help into why it's so choppy in the scrolling