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
Related
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:
I am working on an iOS app using Xcode 10 and Swift 4.2. I have a collection view that has images and once you tap on the image it takes you to a detail page that has the full-sized image, date and saying displayed. The data for these details are stored in an array and passed from the collection view to the detail page. I want to be able to swipe left or right and go to the previous or next item from the collection view as you would in the photos app.
Is there any built-in functionality that allows for easy paging/swiping, or is a programmatic manipulation of the array index the only way to accomplish this task?
I don't know if you are familiar with CocoaPods, but there are plenty that can work for you, for example there is SwiftPhotoGallery, but that just maximizes images and let you swipe right and left as you said.
For the specific functionality you describe I would suggest that in the navigation to the "Detail Page" you sent the whole array too, and just show the index of the item tapped in the collection, your "Detail Page" will be a UICollection as well but with a custom cell that takes the whole space of the screen and with a horizontal flow so you can swipe right and left, if you have this code in your github account or any other repository I'll be willing to help to make my point clearer.
I am trying to make an app that you can scroll through and it displays a different string on each page. I though I should use scroll views as they seem to be how I can do this. An example of what I want is UberFacts app. This app you can scroll along and it has a different fact each time. This is obviously not just thousands of different view controllers that are linked by the page control. How do I make view controllers work like UberFacts?
Thanks!
UberFacts seem to use a paginated ScrollView and each page looks like a vertical ScrollView also (you can see by the bounce). But is just one ViewController that manage all those pages.
I don't know if this is possible at the moment but is there a way to scroll the watchkit Table page style similar to the page scroll on the iPhone TableView.
Or if not is is there a way around this?
By page style I am assuming you mean horizontal scrolling page by page. In WatchKit there is only one way to do horizontal page based scrolling. You have to set up a page based UI. You will have to have a new instance of a controller for each page. See http://natashatherobot.com/watchkit-page-based-navigation/ for more info.
I am trying to develop a collapsable/accordion like feature in my iOS app. This would be your typical FAQ type feature that would be found on web sites. I would like to tap the heading and then the detail is displayed.
Since this is for the help section and there are only a few items I thought I would be super simple to embed an HTML file with some JS in it to perform the action and render it in a web view. I got that to work without an issue. It loads and works great. However, with the web view I can 'bounces'/pull down the view to reveal the background of the main view. Now, this would not be a problem normally but since the designers use some gradients it looks awful. I set bounces to false and all is well but not super smooth when scrolling.
Here is an example of the accordion I am talking about.
I then found this project.
Which is a little more on the right track. But the table view height stays fixed and does not act like the other accordion view.
My question is this....am I missing something? Should I be looking at a different design pattern? Any ideas are appreciated.
I never found the answer. I ended up creating a basic master - details table view instead.
I created an array with 4 dictionary objects. Each object has a title and an array of the items for the details.
My main table view is showing the 4 dictionary object titles and the detail view is showing the rest of the array elements. Seems fine. I was hoping to find a dynamically sizing table view but no such luck. Maybe for the next release.