UITableView - How to specify start position for horizontal scrolling - ios

Could anybody please help me understand if there is a way to provide the start position for horizontal scrolling in UITableView?
Basically, I have enabled horizontal scrolling by giving content inset like [self.tblData setContentInset:UIEdgeInsetsMake(0,0,0,500)];. But, I do not want the section headers to scroll. Is there a way that I can fix the section headers while scrolling horizontally?

If you want to scroll the view horizontally, i suggest that you should replace UITableView with UICollectionView。
If you want to scroll just one cell horizontally, you can add UIScrollView into cell.contentView.

Related

Collection View Dragging Cells when scrolling

I have one UICollectionView with many sections and cells. I have used custom UICollectionView layout to achieve this design. It has scroll on both horizontal and vertical, with some static cells. Check the video for more details. All the data is setting proper.
Video Link.
Issue is with dragging. I want to drag the cells in the vertical direction and if its within the visible cells there is no problem. But when the cell is drag to scroll the UICollectionView and to bottom there is layout issues with top sticky sections.
Blue remains static when scrolling from left to right and red remains static when scrolling to bottom.
I have implemented drag using longpress gesture. And used CADisplayLink to scroll the UICollectionView while dragging. It would be better if any suggestions on how to scroll the UICollectionView while dragging the cell and how to keep the sticky cells without and layout issues.

Horizontal UICollectionView with Header on Top

I'm kind of stuck with a problem here. I need to create a horizontal scroll Collection View, but when I select to add its header, xcode sticks it on the left side of the cells and I need it to be above the cells, as on the vertical scroll.
Any tips?
embed UICollectionViews in a UITableView like so:

Mixing UIScrollViews and UITableViews

If you look at the Featured tab of the Apple App Store app on an iPhone 6, there is a unique UI layout that I can't figure out how to replicate.
At the very top there is a navigationBar. Below this there is a UIScrollView that animates through a number of featured items. Below this is what appears to be a UITableView with a number of custom programmed cells.
My first guess was that the UIScrollView at the top was added to a custom cell at the top of a UITableView. If you swipe up the UIScrollView moves with the objects below like it is a cell. You can see that the vertical scroll indicator starts at the top of the UIScrollView.
The part that is unique is that if you swipe down, the objects below the UIScrollView move down like a UITableView and the UIScrollView stays in place. This means that the UIScrollView is not a custom cell at the top of a UITableView.
I tried making this work a number of different ways but I can replicate this. Does anyone know how this can be done?
You can use a tableview header,the header is a scrollview
If you scroll tableview up,just use tableview default behavior,the header will scroll up.
If you scroll down,use UIScrollViewDelegate to calculate the tableview header new frame,and adjust it.So it remain at top
Not sure if I got you correctly, you may use UICollectionView as vertical scroll. Then, you create a custom UICollectionViewCell, each with horizontal scroll.
I haven't tried it though but done something similar to this. Hope you find a way!

How to make UITableView scroll both horizontally and vertically

I don't know How to make UITableView scroll both horizontally and vertically as Kickstarter ios app. Would you please explain briefly how can they do both way? Thank you.
Tab scroll horizontally
Tab scroll vertically
P/s: sorry, my reputation point is so low that i cannot embed the image.
There are actually two different levels to the two directions of the "table view". The vertical scrolling is some sort of paginated table/scroll/collection view; this can be accomplished using a table view, a scroll view, or a collection view. Here's a great answer on how to do vertical paging in a scroll view. Within each page, it looks like a UICollectionView.
That is simply a vertical UIScrollView with paging enabled. Each page is populated with a horizontal UICollectionView.

How to UITableView & UICollectionView link vertical scroll and UICollectionView & anotherView link horizontal scroll, like a SpreadSheet iOS

I have a problem with the creation of the layout shown in the picture.
Does anyone know how can I create it.
I want to link left tableview's (only vertical scroll enabled) horizontal scrolling with collection's view horizontal scrolling, and create scale view (only horizontal scroll enabled) horizontal scroll linked with collectionView horizontal scroll.
I know it is a bit chaotic, but I think that diagram best represents my problem.
I would also like to load collectionview's data in real time while scrolling.
At the end I will add that I am using the storyboard in my app.
Link to my schema picture

Resources