I am trying to create the ability to swipe down to access the next view controller or in other words I want to pull down the view controller from the top. I created a sample of how i want it to look and work using a scrollview. The problem when trying to use that method however was that I am no longer able to interact with the first view because the scrollview is covering it.
I want the top view to cover the bottom one when it is pulled in. I also want it to be in sync with the users finger, the same way the scroll view with paging enabled does in my gif example.
Related
I am a beginner in developing iOS applications. Working in an application, where I am making all views programmatically.
I want to display a Map along with different bottom views. When first time the view is loaded, it displays Map along with first bottom view. When user performs an action, it displays the second bottom view but with the same Map View.
So in a nutshell I need to keep the same Map view but display several bottom view based on user action. I am looking for a better way to display bottom view based on user action and if user click on back button, it should return to last-displayed bottom view.
I tried to apply NavigationController on the bottom view controller (which is a child controller to Map View Controller) but it displays the child view in the entire windows instead of displaying in the bottom.
I also thought of registering bottom views to an event and show/hide bottom view based on what kind of event occurred. But here I also want to keep track of last event so when user clicks on back button it should display the last view. As this is very initial state so don't know if it's a good idea or not.
use a collection view with paging enabled and width of each cell equal to the screen width and scroll to next cell based on user action.
I am trying to implement a left-right swipe gesture to navigate between an array of objects, that i can change the properties and take actions. The navigation is more of a previous-next approach. I have a table view that segues to this Viewcontroller, and i would like the user to check the next object without getting back to the TableViewcontroller. What is the best approach to implement this?
I know PageController isn't ideal in my situation as i'm not navigating between different VCs.
A page view controller is the best way. Make the views view controllers instead. It does all the work for you.
Failing that you could use a collection view with a custom flow layout.
Failing that, you could roll your own custom view controller that implemented this feature.
EDIT:
Based on your screenshot, where you say "swipe back and forth to move between rows of a table view" you need a collection view. Table views scroll up and down between rows. That's what they are made to do, and trying to implement a swipe interface to instead scroll side-to-side is crazy. Simply use a collection view configured for horizontal scrolling between cells.
I'm interested if it is possible and if possible how to embed some kind of a page view control into a small view on a screen and react on taps on it.
Use a container view. Container views allow for page views and scroll views alike to be nested like a normal UIView which you can place within other views. As far as tapping to switch pages, use a touchesBegan function to call the next page.
I'm trying to implement sth like images below. there are some views that should be displayed in a sequential order and a bar above them shows the flow of tasks.
as it is shown, first profile view should be displayed. when the user clicks on Go to Next View Button second view (price view) should be displayed. the top bar shows the current view where we are in it. I've tried PagingMenuController already to create a menu with views and then disable scrolling. but PagingMenuController loads all views at the same time and also i don't know how to go to next menu item within child views. now I'm thinking of a container view might be helpful but i didn't use container view so far and i don't know it's good for my purpose or not.
also i want that top bar without swiping between views (only on buttons) and one enable view at the same time.
any helps would be apprectiated.
Your question is both broad and vague. My answer is also going to be fairly high level. I suggest you follow my outline, and if you get stuck on a particular step, post your code, tell us about the problem you're having, and we can help you fix it.
This is pretty simple. Create custom view controller. Give it a container view at the bottom that would contain the current child view controller. Use view controller transition methods to switch between child view controllers. You'll want to add layout anchors to each new child view controllers to pin all of it's view's edges to the edges of the container view.
Create a custom control on top to show the dot and highlight the title of the current view controller.
If you want the next/previous buttons to be on the child view controllers, put them there, and add a delegate property to all the child view controllers that points to the parent view controller, with next and previous methods.
BTW, in languages, like English, where text is laid out from left to right, I would think your first page would be on the left and the last page would be on the right. (I think it makes more sense for profile to be on the left and pay on the right.)
I want to create a touch control, where I slide left and the view scrolls in a paged mode (like in Photos app where you slide between photos) but instead of a view in a current controller coming in, I want a new controller to come in with it's own view. What control should I use to build something like that?
You can use UIPageViewController to navigate between different ViewController like a scrollView
You can follow this tutorial
1-http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/
2-http://www.appcoda.com/uipageviewcontroller-tutorial-intro/
3-http://www.makemegeek.com/uipageviewcontroller-example-ios/
hope it will help you