SVPullToRefresh icon indicating copy to clipboard operation
SVPullToRefresh copied to clipboard

UITableView Top cell cut off my navigation bar

Open ghost opened this issue 10 years ago • 4 comments

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?

ghost avatar Dec 20 '14 19:12 ghost

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

skmohanraj avatar Jan 13 '15 04:01 skmohanraj

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.

liruqi avatar Jan 27 '15 03:01 liruqi

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

Sean-Wang avatar Jun 29 '15 14:06 Sean-Wang

@liruqi Thanks, man. It did the trick!

skyline75489 avatar Nov 18 '15 04:11 skyline75489