MBPullDownController icon indicating copy to clipboard operation
MBPullDownController copied to clipboard

Table view scrolling issue

Open Isuru-Nanayakkara opened this issue 11 years ago • 3 comments

Hi Matej, I have come across 2 issues using MBPullDownController. I'm using the Storyboards method by the way.

  1. I have a UITableViewController as the back controller. And the problem is the last couple of cells are obscured by the front controller when scrolling. For example, I have 10 rows here. ios simulator screen shot may 6 2014 12 32 38 pm

But the last cell is covered from the front controller view. The table view doesn't reach the end. If I pull up, you can see it but if I let go, it hides behind again.

ios simulator screen shot may 6 2014 12 32 44 pm

  1. In my above example I have only 10 items. If I increase it up to say, 30 and try to scroll to the bottom, it gets stuck halfway!
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 30;
}

I cannot scroll back up or down. It's weird. I have no idea why that's happening.

I also uploaded a small Xcode project to demonstrate the issues I'm having. If you can take a look at it and tell me how to correct them, I'd really appreciate it. To https://www.dropbox.com/s/xfdvbnlzxulim8e/PullDownTest.zip

Thank you.

Isuru-Nanayakkara avatar May 06 '14 07:05 Isuru-Nanayakkara

Hi Isuru-Nanayakkara,

I've got the same issue with all type of scrolling view. Did you find out a solution?

Thanks,

Pierre

plefebvreAdmazing avatar Aug 18 '14 13:08 plefebvreAdmazing

I don't exactly remember. But try this. I think I added the below code snippet to the viewDidAppear of the UITableViewController you're using as the back controller.

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    // Resize the table view so that the last few cells aren't obscured by the front controller
    self.tableView.frame = CGRectMake(0, 0, self.tableView.frame.size.width, self.tableViewHeight - 60);
}

Isuru-Nanayakkara avatar Aug 18 '14 15:08 Isuru-Nanayakkara

Setting appropriate an appropriate contentInset and scrollIndicatorInsets on the table view should resolve the issue.

matej avatar Aug 18 '14 16:08 matej