Search code examples
iosswiftuicollectionviewasyncdisplaykitiglistkit

Recreating Instagram/Pinterest profile - How can I recreate the instagram/pinterest profile in swift?


Currently I am trying to recreate something like the Instagram/Pinterest iOS profile page where you can swipe between sections that have different data and layout while having a header that doesn't scroll horizontally but vertically with each section. A very similar design to the current Instagram and Pinterest profile layouts.

I have made a layout that is similar which uses a custom segmented control in the header that uses a delegate to change between sections but this won't work because I have now integrated IGListKit which uses section controllers.

I have scoured the internet looking for examples on how to achieve this but haven't found anything useful. If anyone could provide resources I could look into or examples on how to achieve the desired layout, that would be helpful!


Solution

  • Check this library out: https://github.com/subinspathilettu/SJSegmentedViewController

    This will give you a ViewController with a header view controller with multiple segments; I have posted a screenshot below:

    enter image description here