-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
There is a white space above my child controllers #264
Comments
I am having this issue as well. Did anyone find a fix for this? Basically, if I scroll away, and then come back to the view, the content is offset to the top of the screen. However, the uI scrollview is not at the top. So basically there is a gap of blank space on the top. Wiggling the pager gets the content to go to the true page's top. |
@electic @junweimah is this present on the later version of AutoInsetter (1.2.2)? Sent with GitHawk |
So I just forced updated the podfile to 1.2.2 and yah, it is still there. |
So here is the intital state: https://pasteboard.co/HcZ1d8P.jpg I scroll down and then I then slighly wiggle the pager. https://pasteboard.co/HcZ1qPW.jpg Notice the content in moves in this shot. Then I scroll up and you see the gap. |
So I got it to work by changing something in the tabman file: `
` This seems to fix it. Not sure if this helps :/ However, obviously, the inset needs to be adjust manually now. |
Where should I add this code to? Which tabman file? |
@msaps Did you see my email I sent you yesterday? I recorded some videos for better illustrations |
I think the issue is that the indenting engine is not accounting for some scenarious. For example in my case, I have: UIScrollView In this case, I would assume the indenting engine would skip trying to indent the UITableView and indent the parent scrollview or the parent uiview. At least that is what I understand for the code. I have another dashboard in the second UIViewCongtroller where it is:
In this case, I notice it indents the uitabbleview in the middle of the view. So, I think it is something to do with the auto indentation engine and I am not to familiar enough to fix it. For now, to get around this I have disabled the autoindentation and in my constructor just added a property to optionally set padding on the top. Hope it helps. |
@electic By the way you said you changed a file :
Which file is this that you changed? |
So basically before you set the datasource for Tabman, put in this line:
That will disable the autoinsetter engine. Then you can manually just move your content down 45 pts. |
Thanks. After some effort i got it working, have to manually set top value for child |
@electic @junweimah will take a look at the AutoInsetting logic, and see if I can fix it. Ideally it would handle these sort of scenarios, because it should attempt to find the relative position of the view in the root superview and inset as necessary. |
@msaps, happy to give you the code or we can do a google hangout as well. Whatever helps debug the issue and saves time :) I use snapkit, so reviewing the code shouldn't be too bad. |
@electic would you be able to see if you can reproduce the issue in this demo project? I've reproduced the kind of layout you are using with a default Tabman setup: |
Getting some errors during compiling:
I will work on a sample project tonight and attach a zip. |
@electic apologies - was using local pods 😅. |
Hi, I use snapkit. But either way, this project has the gap as well. https://pasteboard.co/Hdma69A.png To reproduce.
Here you will notice that Row 0 suddenly comes down.
|
@junweimah @electic - should now be fixed as of AutoInsetter v1.2.3. The issue was caused by the calculations that decide how much to inset a view by based on its relative position using the incorrect superview in the hierarchy. Let me know how you get on! |
@msaps It does look like it solves the problem. Going to keep testing it today, will let you know if I find something. Thank you for the great component! |
Sorry I don't know how merging works. Do I need to remove the pod and pod install again? How do I get the latest code? |
@junweimah The latest code is in AutoInsetter. The pod has been released. To force it to update, just add the AutoInsetter pod. Here:
|
@junweimah @electic it’s probably best to use the constraints of Tabman for versioning.
To update AutoInsetter, rum Sent with GitHawk |
Coming from
So I have solved the bug stated there, now I am using these codes in my
initializeViewControllers
:When I land on my parent vc, there is a white space between the child and the custom UIView from the parent vc. And scrolling left and right will remove the white space. I have recorded 2 videos and sent you through email, please have a look.
The text was updated successfully, but these errors were encountered: