UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Any ideas on how to achieve this layout?

Forums > iOS

Hi everyone..

Wondering if anyone has any insight on how to achieve a layout similar to this...

https://imgur.com/a/vwLzy2v

You can see the content has the ability to slide underneath the piece on the left AND there appears to be pinned section headers.

My first thought was a table view, but obviously you can’t scroll horizontally. I’m guessing the only other option would be a collection view but how would you be able to pin the left side to allow content to go under it?

I've seen libraries that let you pin the left side and/or the top row, but i hopefully want to be able to float multiple rows, so that when you scroll to them, the currently floated row goes off screen and the next sticky row becomes stuck to the top, like table view section headers.

Thanks!

3      

Maybe this will help for getting a headstart? it is from Swift on Sundays by Paul. Lots of interesting bits about more intricate collection views: How to build a UICollectionView like the App Store https://youtu.be/SR7DtcT61tA

3      

I think it could very well be TableView for the vertical scrolling, the cell itself looks like part standard UIView and part UIScrollView. You could then monitor the scroll offset and based on that update scrolls views on all visible cells. But maybe this is too complicated and can be achieved in simpler fashion

3      

hmm, yeah. I think the main issue with that approach is all of the cells are independent of each other, so if one cell is for some reason a little larger, it won't expand the entire column with it.

3      

Hi all,

I too am looking for a similar tableview. I have a set of parameters that's in the first column and the data is collected every hour and i need to show that on the columns. Someone help me achive this..

Thanks in advance

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.