Uber's Home Screen Transition Scroll - iOS (swift) - ios

I am working on an app that has the same layout as Uber's Home screen on iOS. There is a section at the bottom of the app that should be scrollable all the way to the top and allow the user to interact with a collection view in the same way that Uber does it. I have attached some screen shots of my app layout below.
Does anyone have an idea on how to do it the scrolling aspect that moved the view and collection view to the top off the of the app while allow interaction with the map behind the content.
I thought of overlaying a scroll view over the map and offsetting it, but the problem with this is the user will not be able to interact with the content beneath it in the same way that a user can interact with the map in the uber app.
Thanks in advance.

You can add the mapview on the view controller's view and then add the container view on top of it, which contains the collection view.
And the gesture on container view, or you can create a handle(a small view) on top of the container view and add gesture to it.
Then to scroll up and down you can use the constraints to change the position.

Related

Is there a way to exit the current view group while using pan gesture in ios?

So I have a horizontal scroll view at the bottom of my screen which contains child views. I would like to drag a view from the bottom and snap it to a defined position on the top. But while dragging the view, it only moves about inside the scroll view. Is there any way to exit the scrollview and get the view outside it?
Layout of the app (I want to take the items from the bottom and snap them to the positions on top):
When you try moving views coordinates with drag, it will only move on its superview, i.e. your bottom scroll view.
If you wanted to drag your button outside of your scroll view then you need to have a trick here.
When user started dragging the button, hide it.
Add the same layout button on main screen on exact position.
Move the newly added button on main screen where ever you want.
Once you drop it, remove the old scroll view button.
It will look like you dragged the same button on main screen but under the hood it was a different logic.

SWReveal View Controller (IOS App development)

I am using SWRevealViewController to show front and rear view. Inside rear view I am using full view Mode and insert table view, but table view cell content is not lies in the middle of screen. it little swap to the right side. I have tried almost every thing, from storyBoard I have used Auto layout and inside cell.m file inside layout subview class but no result.
But when I tap on cell content it appears in the middle of screen, As I wish. please suggest me so if this screen load content appears in the middle of screen of tableview. Your suggestion is highly appreciated. enter image description here
[
you can see how weird it looks
Now I got the answer, we can edit the sw reveal rear width to screen size and same applied to table view size, In this way we can bring the content of tableview in the middle of view enter image description here

How to horizontally scroll between pages of controls in UIScrollView iOS/Swift

I am trying to find the way to implement a scroll view on my viewController screen, which allows the user to scroll between different pages of controls and have the controls around it, outside the scroll view, react to whatever data or actions take place in the scroll view.
All the tutorials I have found is adding a scroll view that shows a carousel of images, or programmatically adding coloured frames. Very little control interaction.
But none that shows how to create 2-3 pages of controls (buttons and labels), and how to integrate it with the parent view (so the parent view and scroll view talk to each other in one view).
So for now, what would be the first step to create a scroll view with 2 'pages' of controls? Has anyone come across any good resources for this? How is the best way to achieve this?
Thanks!
Add Scroll View. Add top,left,right, bottom constraint to scroll view. Set horizontal only in storyboard.
Add a view inside scroll view. Now add height constraint from this view to super view. (Not the scroll view.) Specify some width and add width constraint.
I suggest you to use UIPageViewController for this type of scrolling.
I suggest you go for UICollectionViewLayout and enable paging to true. Using this will give you the finest control of each page and the horizontal as well as vertical scroll.

iOS iPhone mapview with slide-up scrollview - How to set up?

I am struggling with how to set up the following view arrangement. Not sure what viewcontrollers I should use. Should I use a container view (I'm only supporting iOS6+)?
I have a screen that contains a mapview (and view controller) that is working great. I want to add a view to this screen that slides up from the bottom to partially cover the mapview. This subview will be a scrollview and will have a small handle that is visible even when closed that a user can drag up to open or down to close. When this drawer view is open, the user can "page" left and right through a list of objects and the map will update accordingly.
I don't need any help with the map view or scroll view individually, only how the generate this screen with the multiple views.
Everything I have done thus far is via Interface Builder.
Thanks!
You could create a empty xib (UIViewController) and add this Xib file as subview of the main view. Next add a gesture recognizer to the main view (https://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizer_basics/GestureRecognizer_basics.html), on the right gesture slide the subview up (http://www.raywenderlich.com/2454/uiview-tutorial-for-ios-how-to-use-uiview-animation).

UIScrollview, how to scroll a page under another window

I have a UISCrollview loading webviews, as the user starts scrolling to go to the next page, I need to have the the coming webpage to scroll into the screen from underneath another UIView that is stationary, I tried changing the alpha but its not really what I am looking for. how can I accomplish that?
For example, the scroll direction is top to bottom, now I have a uiview at the top of the screen which has some static data showing ( title, location, and other text labels ), and as the user scrolls down I want the content to scroll underneath the label ui view. Hope this clarifies it.
If I understand this question correctly I'd say you can't do this with a UIScrollView. Instead, you could have separate views for each UIWebView and handle the panning of one view under another with a UIPanGestureRecognizer.
Also, did you know there can be conflicts when using UIWebView's inside UIScrollView's?

Resources