Here's a video of what's going on: https://imgflip.com/gif/kgvcq
Basically, if the cells scroll past the bottom edge of the screen, it won't bounce back. I've tried updating the contentSize
of the tableView
but that doesn't seem to be the issue. I've also made sure to declare the rowHeight
and still no luck. Lastly, I've made sure the bounce
properties of the tableView
are set properly.
Sorry for not putting up code, here it is:
// data source
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"frame height: %f", tableView.frame.size.height);
NSLog(@"content size height: %f", tableView.contentSize.height);
static NSString *CellIdentifier = @"HabitCell";
HabitTableViewCell *cell = (HabitTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.viewController = self;
cell.delegate = self;
// edit cell
return cell;
}
The NSLogs
are returning: 568 and 400 respectively. Would it be the frame causing problems? Also, I have not overridden scrollViewDidScroll
.
Implemented Data Source Methods
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [self.habits count];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if ([indexPath isEqual:_expandIndexPath]) {
return 450 + heightToAdd;
}
return 100;
}
Fixed: I had a call to scrollToRowAtIndexPath
in my UIPanGestureRecognizer
method. Removed it and it now works perfectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With