SLPagingView icon indicating copy to clipboard operation
SLPagingView copied to clipboard

The pushed uitableviewcontroller has wrong contentSize

Open Borys216307 opened this issue 9 years ago • 6 comments

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.

Borys216307 avatar May 07 '15 05:05 Borys216307

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

harkmall avatar May 10 '15 22:05 harkmall

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

mengjang avatar Jul 17 '15 05:07 mengjang

Any workaround?

mengjang avatar Jul 17 '15 22:07 mengjang

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

harkmall avatar Jul 18 '15 16:07 harkmall

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 avatar Oct 12 '15 13:10 batical

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

batical avatar Oct 12 '15 17:10 batical