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

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!

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:

Related

Instagram like Profile Page iOS Swift

I'm trying to make Instagram profile page like scrolling
Basically it's scrolling whole page, The top is a header, and there is a segment controller and then there are collection view.
I'm trying to do the same, but it doesn't look smooth. And I have to handle all the scrollers manually.
I also tried to add the header as part of CollectionView as UICollectionView.elementKindSectionHeader, but it only working well if the collection view is just one.
In my case, there are three collection views(for 3 segments), and they are inside another scroll view. So Can't just add the header in any of the collection views according to my current design.
Does anyone have any good solution for this, or have done something similar?
Instagram Profile page reference: Instagram Profile Page

Horizontal scrolling in section of UICollectionView in iOS, Swift

I develop an app for online shop that should has some design features that I don't know how to implement. Lurking for it second day, but no profit. I suggest, that it should be the simple CV with some custom cells for different needs (banners, products).
Problem - design has scrollable horizontally content in each section and I see no simple way to implement it instead of writing custom flow layout.
I tried to make a tableView with collection view in its rows, but its not working correctly.
May be you know some examples of implementation of same thing in swift or a good way to make such feature without flow layout?
Refer mention link May be help you from this link:- https://ashfurrow.com/blog/putting-a-uicollectionview-in-a-uitableviewcell-in-swift/

TVOS about App layout (Like in iTunes and similar)

I have played a lot with my app and I do not understand how to make layout like in for example iTunes (also many apps uses it).
How it is made? It is one big CollectionView, but with special Flow or it is TableView with many CollectionView?
Collection headers. In iTunes App if I select item (with adjustImageWhenFocused) under the header then the header will jump up and the item will not overlap the header. It is special magic or it is system behavior and I just do know how to use it?
Below is two screenshots about what I am trying to tell you and example with my app.
In iTunes there are movie preview page. With what type of View it is made? TableView,CollectionView or just ViewController with ScrollView?
I have read many sources and looked up demo projects, but nowhere I have found answers for this questions.
1) I think it would be a stackTemplate containing a couple collectionLists.
2) AFAIK the headers "jump up" on their own, no need to prepare anything special.
3) productTemplate?
For examples, see https://github.com/iBaa/PlexConnectApp, /TVMLTemplates/Default/Movie_OnDeck.xml (1) or Movie_PrePlay.xml (3).
Or check the gold source: https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/StackTemplate.html, plus other Templates.
If you want to use native Swift way it can be achieved in following ways:
You can use table view and have collection view within each cell. I am using same approach to achieve this.
We have focus update delegate from there you can find the focused frame of image view. With the help of focused frame and label frame you can check if they are intersecting or not. Based on that you can move label up and down.
This is native TVML template, in order to achieve in swift you need to create view using tableview and collection view.

Swift-How to add a parallax header like the one in Spotify?

I was wondering if anyone knew what the best way of creating a similar tableview header effect to the one in Spotify was. I have looked at libraries such as CSSStickyHeaderFlowLayout, but they are written in Obj-C and are for CollectionViews. What's basically got to happen is that as the user scrolls to find more tableview cells at the bottom, the header stays in the same place and the top cells start covering it. This is seen in the example section of the git page of the library above.
Thanks in advance for any help!
Try using the solution found here
The original example uses Obj-C but the asker's response uses Swift. They also make use of TableViews rather than CollectionViews

Add ViewControllers in a Scrollview

I'm working on a project where I'd like to have a series of user interactive views (created in Interface builder, and have their own implementation and header files), displayed in a single scrollview with paging enabled. I have yet to come across an example which is easy to understand. Could someone provide code which does this?
Here is a schematic of how things should work.
You can use UIPageViewController with Scroll style if you are targeting ios 6 or later, which is much easier than UIScrollView. And if you search UIPageViewController scroll example in google, there are quite lots of samples. The following are two of them:
Using ScrollStyle with UIPageViewController
How to Use UIPageViewController to Build Tutorial Screens
Hope this is helpful for you.

Resources