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

The pushed uitableviewcontroller has wrong contentSize #29

Open
Borys216307 opened this issue May 7, 2015 · 6 comments
Open

The pushed uitableviewcontroller has wrong contentSize #29

Borys216307 opened this issue May 7, 2015 · 6 comments

Comments

@Borys216307
Copy link

I have integrated SLPagingView in one of my viewcontroller by inheriting from SLPagingViewController.
Now I tried to push another ViewController from this one and the pushed one had wrong contentsize - (1135, 504) and it can be moved horizontally when dragging.

Very weird.

@harkmall
Copy link

I have the same issue, the content size is too long for my screen and it scrolls horizontally too

@mengjang
Copy link

I have a similar issue. I use SLPagingViewController as my root controller. When I present a UIImagePickerController, it can scroll horizontally too.

@mengjang
Copy link

Any workaround?

@harkmall
Copy link

I ended up using a different project for this.
https://github.com/golfguru1/GUITabPagerViewController

@batical
Copy link

batical commented Oct 12, 2015

Got same issue, first time it is correctly displaying
0->1->2 (contentSize ok) -> 3 -> 2 (content size not ok). I am just displaying a UItableViewController

suppose nobody got a workaround for that and switch to another lib ?

Some test I made. It happen after swiping or event using the bar icon.

With A refresh control, when I am reloading i add a tableView.layoutIfNeeded and fix the table but that is not good

When it is working fine, the scrollView.contentSize = 320 x 330
When I am swapping and having the issue scrollView.contentSize = 2880 x 60 so the size is strangly calculated.

in your code I just add a print in the updateContentSize method (from the category UIScrollView) and I got 2880 x 60

So, i am still looking for a fix, but my guess if that the contentSize of the scrollView (in tableviewController) got mixup with the contentSize of the scrollview in the top bar

@batical
Copy link

batical commented Oct 12, 2015

For testing. I add a tag value ton the scrollView inside SLPagingViewController
and UIScrollView+UpdateContentSize i apply updateContentSize only for the scrollView witht this tag value.

Seems to fix the problem. But kind of ugly fix. Was more for testing purpose

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