So I jsut did it that i created the view and add it when they select a certain row, and it works great pops up and everything, but when you try to scroll the tableview, the toolbar scrolls with it, so it winds up llike halfway up the screen. Im assuming this has to do with the fact that since im using a UITableViewController, the tableview is the actual view of the controller, but idk a way to fix it. any ideas?
Heres the codes i use:
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ToolbarController *toolBar = [[ToolbarController alloc] initWithNibName:@"ToolbarController" bundle:nil];
toolBar.view.frame = CGRectMake(0, (self.view.frame.size.height - toolBar.view.frame.size.height), toolBar.view.frame.size.width, toolBar.view.frame.size.height);
[self.view addSubview:toolBar.view];
[toolBar release];
if ([tableView cellForRowAtIndexPath:indexPath].frame.origin.y > toolBar.view.frame.origin.y) {
[tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
}
}