StefanLage / SLPagingView

Navigation bar system allowing to do a Tinder like or Twitter like
MIT License
1.01k stars 85 forks source link

The pushed uitableviewcontroller has wrong contentSize #29

Open Borys216307 opened 9 years ago

Borys216307 commented 9 years ago

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 commented 9 years ago

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

mengjang commented 9 years ago

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

mengjang commented 9 years ago

Any workaround?

harkmall commented 9 years ago

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

batical commented 9 years ago

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 commented 9 years ago

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