Closed pbreah closed 5 years ago
Hi @pbreah! That you for the detailed report. It's a bit hard to say without being able to debug your application, but it looks a bit like you just need to set the contentInset
of you scroll view to account of the header view. For instance, in the HeaderExample
we do this: https://github.com/rechsteiner/Parchment/blob/master/HeaderExample/ViewController.swift#L112
Does that fix the issue?
@pbreah did you manage to get this working?
First of all congrats for such amazing work. This is an implementation question I have been attempting for several days without success.
I have a parent UIViewController that I'm using to implement the paging menu. It works in the sense that I see the menu and the child controllers load and I can see the content of one of the child controllers partially.
On the child view controller I have an UILabel with text content of 4 paragraphs. The problem is I need the content to scroll once added to the parent view controller onto the scrollView. What it does now is the content gets truncated to the screen's bottom edge. Even if I try to force the scrollview content size to be much larger, the text of the UILabel of the child view controller is still truncated - I just get to scroll the truncated content.
Below is the code I'm using. The child view controllers are all setup on the storyboard and the text of the UILabel is static (for now) - as I'm testing until I can get this to work.
I have looked at the examples you have for Scrolling, Header and Storyboard on the repo, and you may see the code very familiar - after mixing and matching all your examples, I still can't get this to work - to allow the entire parent view to scroll and not truncate the text of the child view controller.
Here is how it looks before scrolling:
And here after scrolling the parent view controller:
Here is the code: