IPhone : Autolayout, dynamic content and UIScrollView not correctly scrolling

on Sunday, March 29, 2015

I am having trouble with dynamic cells being added to a static UITableView inside a UIScrollView. The scrollview doesnt scroll all the way to the bottom. Below you will see the max scroll, hiding two more cells at the end of the table. I am using autolayout and not sure how to fix this.



- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section {
[self setTableHeight];
return [player.metas count];
}

- (void)setTableHeight
{
long tableHeightCalculated = 44 * [player.metas count];
metaTableView.frame = CGRectMake(metaTableView.frame.origin.x, metaTableView.frame.origin.y,
metaTableView.frame.size.width, tableHeightCalculated);
}


enter image description here


0 comments:

Post a Comment