Want to have smooth scrolling in tableview swift - uitableview

The problem is I have 6 cells in a tableview and two of the gets hidden because of height but when I scroll up the tableview automatically swipes up and I am unable to stay at cell 5 and 6

I thing problem is in your tableview hight or Constrainsts of tableview.

Related

iOS - How to add subview on top of tableView cell without be covering by the previous Cell

I have a tableivew, I want to add a coachmark on top of the tableview cell. and this coachmark is like a popup.
what I did is uncheck the clip to bonds in this tableview cell so it appeared correctly.
but what happened is when I scroll up/bottom this popup is covered by the previous tableview cell.
so any idea how to solve this issue with making the cell background clear because those cells are colored.
Use followings methods to change z axis distance for your coachmark view
bringSubviewToFront(_:)
sendSubviewToBack(_:) on coachmark or others cells
Example:
cell.contentView.bringSubviewToFront(coachmark)

Collectionview inside tableview cell with dynamic height cells and dynamic content swift 4

I am working with collectionview inside tableviewcell in Swift 4. I get the content from server which is all dynamic. I have to show different types of collectionview behaviours.
For example, in the first tableview row should be collectionviewcell with screenwidth and scrollable. In the second row, collectionview with 3 sections and each section has different content different number of items.
Here I got stuck I am unable to show 3 sections one below other it is showing besides horizontally. I have calculated collectionview flow layout size.
Also in last row I have collectonviewcell with scrollable content,here when i scoll the content is repeating from bottom row or top row. I want the smoth scrolling and to stop repeating the content.
I am new to Swift. Can anybody help me out of this . Thanks in advance.
The smooth way is to create tableview with its cell xib and inside its cell add collection view and create another xib for collection view cell. This method is helpful when accessing collection view for different tableview cell. Rather using without loading Xib's may mixup your code.
You have to set tableview cell height as UITableViewAutomaticDimension. This will handle your cell height as per your dynamic content.
For each tableview cell you have to set collection view's property by using cell's index path as per your requirement.

Tableview Cells Dequeing Prematurely after change in tableview height constraint

I've designed the screen to remove some views as the user scrolls down. This will also trigger an increase in height of the tableview covering for the "removed" views.
The problem is, when i scroll up, cells deque and disappear on the top edge of the old tableview height. This creates this blank gap since it deques prematurely.
How do I fix it so that it deques using the NEW top edge of the tableview?

How to scroll the UICollectionview from particular cell

I have a collection view. I need to scroll only cell4, cell5, cell 6 so on. First two cells are remain same. Is is possible using only UICollectionview. How to achieve this.
FYI: the height of the cell is more than the screen height.
One of options would be to subclass UICollectionViewLayout and update frames in attributes of first three cells every time when scroll offset changes. So the cells would look static.

iOS8 UITableView won't scroll to footer

The problem might be related to this post iOS 8 Auto cell height - Can't scroll to last row but here the conditions are different.
I'm not using self-sizing, just a typical UITableView with fixed height cells. that you'd want for a Settings screen. However, I do add a footer and few other subviews below the footer of the UITableView. I do update the contentSize properly to take into account those added subviews.
Everything works fine on iPhone4/5 on iOS7 but the UITableView won't scroll all the way to the bottom on iOS8 although I do see the content if I try the hold+scroll trick. Any idea what's happening?
Thanks!

Resources