KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I attempt to animate the frame height of a tableView (ex: height -= 200 ), the cells that appear in the last 200px disappear suddenly before the smooth animation of the frame completes. To make sure that it's nothing else I'm doing, I created a new View-Based application. In the main viewController I create my own tableview with enough pseudo rows to fill the entire screen. And on selection of a row I do a simple height animation. most relevant code: - (void)viewDidLoad { [super viewDidLoad]; self.myTable = [[[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)] autorelease]; myTable.delegate = self; myTable.dataSource = self; [self.view addSubview:myTable]; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { CGRect frame = self.myTable.frame; frame.size.height = 200; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelay:.5f]; [UIView setAnimationDuration:0.5f]; self.myTable.frame = frame; [UIView commitAnimations]; } Does anyone know why this is happening, or what a fix/workaround may be? Any suggests are really appreciated. TIA!
Tags (comma-separated)
Save Edits
Cancel