UITableView Scroll animation - ios

I'm trying to make a tableview witch scrolls automatically in very slow speed to the bottom and then goes back to the top and starts again in a loop. The user also have to be able to scroll independently , I tried with
tableView.scrollRectToVisible(CGRect(...)) with no luck, also tried with tableView.scrollToRowAtIndexPath(...)again with no luck.

Related

How can I prevent a Tableview from snapping back to the top?

Currently in the app I am making, I have a tableview. The issue is that when I try to scroll, it always snaps back to the top rather than letting me scroll through the entire list. I assume it is simply a setting in the storyboards, however I haven't been able to find it. Here is a video of the issue:
https://youtu.be/wSUb9ofFASM
Additionally, here are my scroll settings:
Please let me know if you have any idea as to how to fix this so that the user can freely scroll through the items in the tableview without always being sent back to the top.
Remove equal height and add bottom constraint of table view to 0

cross scrolling: tableview inside UIpageViewcontroller does not behave properly

In my app, I have a UIPageViewcontroller. Inside the UIPageViewcontroller, I have a Viewcontroller with a table inside of it.
The problem I am having is, when I am scrolling down the table, I can't scroll between pages. unless I lift my finger up. (this also has to make sure that table stops scrolling completely)
I was hoping there would be a more natural way of doing this.
Is there a way to swipe between pages even when your scrolling down the table, without have to lift up your finger
I just tried Instagram, they have same UI as you are trying to achieve.
When I scrolled through Insta posts, I could not Swipe between View Controllers until table scroll stops.
1 option you can do is to reduce the speed of table scroll using following code:
self.tableview.scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
This code will allow table to stop quickly and hence user can swipe.
Hence, I would say, it is not possible to swipe between view controller unless table scrolling is stopped.

developing an infinite title slider with corresponding pageViewController

ok, I wanted to create these custom controls I've seen in this app:
DownTown App
an infinite title slider above and an infinite page view controller below. you can scroll title infinitely and after scrolling finished, corresponding page controller scrolls to target viewController in that direction.
and you can can scroll the view controller below, and above titleSlider also scrolls with that.
so I create these components but the result is not exactly what I want, because there were some challenges I couldn't solve them. here you can download the component:
http://github.com/hashemp206/HAInfinitePageController
the first problem is as as I scroll titles, the target cell rest at center of view. but as I scroll faster and more you see the title is not resting at center and I have to manually move that cell to the center with animation.
to clarify how this title slider scrolls infinitely, I have created a UICollectionView with 3 section. when scrollView reaches an offset limit, I will jump back to the middle section.
the second problem is when I scroll the below pageController slowly, the above title slider moves well and correctly, but when I scroll faster this synchronization gets corrupted, and the title slider scroll can't synchronize itself with below page controller.
so I'm asking you expert guys, can you see my developed component and guess why it is not working well?
or if you want to challenge yourself can you develop this component exactly?

Choppy Scrolling Animation for UITableView in iOS8 Using Dynamic Cell Height

I'm working on developing a newsfeed where most cells have different heights from each other. So I'm using Apple's new built-in system to calculate the height of the rows dynamically in iOS8.
The problem happens when I have to load a new page. When I do that, then scroll back towards the top, the content size of the table appears to be smaller than it should and the loading of the cells is really choppy. So when I start scrolling upwards, I'll be at the 5th cell and then all of the sudden the 4th cell will jump down. I attached the project if you guys want to see my code: https://github.com/KhanFu/TableView-Dynamic-Cell-Height-Pagination
If you keep an eye when you're scrolling the table view, you'll see it jumps upwards. To re-create the bug, first scroll all the way to the bottom, so it loads the next page (11, 12, and 13). Then start scrolling upwards. For the clearest version of this, keep your eye on the number 7. Watch how it almost instantaneously becomes 6.
Essentially, when the content offset of the table reaches the bottom of the table, I adds an object to the table's data, then I add a row with insertRowsAtIndexPaths.
I've been banging my head against this problem for awhile now. Let me know if you need more information. Thanks!

UITableView not reloading data when not visible?

I'm puzzled with this.
I have a UIScrollView and inside I have placed 4 tableViews.
The whole thing is used to allow scrolling horizontally and switching tableViews like the Groupon app.
As soon as you start scrolling the 4th (left or right) tableView, is moved in the scrollView and a reloadData is initiated on that tableView, so it will load the data from the datasource for that category.
However, when I scroll into that tableView, it still has the data from the previous category, meaning the cell's didn't get refreshed.
Can anyone shed a light on why this is happening?
I'm guessing only that because the tableView is not in a visible frame when I call the reloadData command, actual drawing is not happening in the tableView (the datasource methods are being called normally, but no drawing is happening).
Any ideas, or tips ?

Resources