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
Related
I am creating an app using Swift, and I'm still trying to figure out what the best configuration would be.
What I'd like to have is 3 screens (the left screen would have a side out panel) that users can access via the navigation bar menu or just by swiping left/right the screen for more accessibility.
I could easily create my TableViewControllers/CollectionViewController and the menu, but I'm struggling at making the screen able to detect users gestures at the same time, and I'm not sure whether I should use 3 View Controllers and then add the Collection View/Table View via the Storyboard, or directly use the CollectionViewController/TableViewController
I added a picture here describing what I'd like to accomplish:
Also, I wonder whether I should use storyboards or not for my project.
I know that's a lot of questions !
Any ideas please ?
Thank you very much and have a good day,
J.
You need to add 2 "swipe gesture recogniser"s to your middle screen(your second screen in your attached image) , and set one for identifying left swipe and another for right swipe. Create action methods for both in your view controller and add code accessing left screen and right screen in respective methods.
note - you need to drag "swipe gesture recogniser" to top bar of your view controller scene to add it.
You can use a scrollview as a container, put three ViewController in it.
I want to make a tutorial in my iOS application and I have a tableview with a drawer.
For the first time that the user enters in this screen, a tutorial overlaps the screen first, and disappears after the user taps OK.
Like this
I've tried this tutorial:
http://swiftdeveloperblog.com/creating-custom-user-interface-files-with-xib-in-xcode-6-and-swift/
in which I can use in a UIView but not in a tableview.
I hope someone can give me a hint on how to do it or what to use.
Try this for tutorial view Controller
https://github.com/ariok/BWWalkthrough
In your FirstView controller,
1) Create instance of tutorial ViewController
2) Present that Tutorial ViewController
There is a close button delegate method in BWWalkthrough, i.e. walkthroughCloseButtonPressed() in this method dismiss your tutorial viewController.
I just made a temporary solution to my problem.
I made an image like this:
Create a ViewController and put the image, then add label and button (edit cross dissolve as transition type).
Show this view controller for first time users and go to the next view controller if the button is clicked which is the real view controller(the one that has table view and sliding menu)
The problem here is I need to have different images for different screen size if I really want that the user wont notice the tableview spacing, but it still looks fine.
I am trying to implement swiping a UIViewController's view up and down. This would be similar to Facebook Paper (swiping down to reveal search, post and other controls), or any other app that gives the user full control of moving the view with their finger.
Does anyone know how to do this efficiently?
The simplest solution is to manage your individual view controllers with a UIPageViewController, described this way on the class reference page:
A page view controller lets the user navigate between pages of
content, where each page is managed by its own view controller object.
Navigation can be controlled programmatically by your app or directly
by the user using gestures. When navigating from page to page, the
page view controller uses the transition that you specify to animate
the change.
You can specify UIPageViewControllerNavigationOrientationVertical as the orientation if you want the pages to move vertically, and you can also specify the gestures and animations used to transition from one view controller to the next.
I ended up finding that menus like this one are what I am looking for.
Though, they aren't recommended by Apple. See WWDC 2014 Videos, Designing Intuitive User Experiences.
I have seen reveal menus like the one in Facebook app. But that is not I want. I would like to have an arrow and when u click the button the slide menu should slide out from hidden.
Is there any code examples or opensource libraries that is able to do this?
Need some guidance on this. Thanks..
For example, i have a button with an image called pull me and it is sitting at the bottom and when i pull it, the menu comes out on top of existing view..
To achieve this functionality, you'll need to create a custom container controller class and instantiate it with child view controllers. The views of the child view controllers will be managed by the container controller using custom animations.
It would be better if you build your own container controller, but if you really need a library, here's one : http://www.cocoacontrols.com/controls/slide-navigation-view-controller
It manages sliding the primary/root view in any one of the 4 directions (up, left, down, right).
Hope this helps
I have a nice iPhone app built that uses a UINavigationController to navigate through a series of tableviews. I now want to add a persistent banner at the top of all of my views, either above the navigation bar or just below it. I do not want it to scroll with the tableview, so I do not want to make it a custom first row.
Any ideas on the best way to approach this?
What I did to achieve this was to make a new UIView for each of the views that I needed the banner on, and placed the banner in there, and the table or other view below the banner. This doesn't keep the banner there persistently through the transitions which is what I really wanted, but I was able to get a non-scrolling header above my tables.
EDIT:
The "correct" way to do this now would be to have a root view controller that consists of your header, and a container view, and then all of the navigation and content goes inside your container view. Although this does require ios6+
You could customize your navigation bar so that it displays the "classical" bar and then, above or below it, it draws your specific content. See this post for more detail.