Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITableView Top cell cut off my navigation bar #230

Open
ghost opened this issue Dec 20, 2014 · 4 comments
Open

UITableView Top cell cut off my navigation bar #230

ghost opened this issue Dec 20, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 20, 2014

When I add this code to my viewDidLoad

// setup pull-to-refresh
[_packgeTableView addPullToRefreshWithActionHandler:^{
    NSLog(@"pull to refresh");
    [_packgeTableView.pullToRefreshView stopAnimating];

}];

And I add this code to my viewDidAppear
[_packgeTableView triggerPullToRefresh];

My top cell of my table view is cut off, is there any known solution to this?

@skmohanraj
Copy link

Hi nporter19 ,
Do you got solution for this issue? if yes mean please help me to resolve this.
Thanks in advance!

@liruqi
Copy link

liruqi commented Jan 27, 2015

You need to add action handler in - viewDidAppear method (or after), as you can get correct scroll view contentInset then. In - viewDidLoad, your scroll view has not set the final contentInset after in iOS7 or later, typically all zeros.

- addPullToRefreshWithActionHandler method record current scrollview contentInset as originalTopInset, originalBottomInset, and reset to that contentInset after - stopAnimating.

@Sean-Wang
Copy link

BUG: TableView section headers hide behind the Navigation bar in iOS 7 #181 @skmohanraj @nporter19

@skyline75489
Copy link

@liruqi Thanks, man. It did the trick!

scottcc added a commit to binnj/seafile-iOS that referenced this issue Nov 10, 2017
Turns out the key is ensuring that the pullToRefreshHandler
block is set in viewDidAppear, not viewDidLoad.

Here's a reference/discussion with the author:
samvermette/SVPullToRefresh#230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants