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
Related
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 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 have a storyboard with a view controller(Menu View Controller), in which if the navigation bar’s menu button is pressed, a menu like view slides into the screen. I achieved this by animating the trailing constraint of the left menu view, from 0 to a value and vice-in-versa.
The storyboard looks like,
Now, by this method I have a slide-in slide-out menu view,
end result is like,
now what if I need to use it as a common component in more than one view controllers?
Can I have this menu view controller in a separate storyboard and then refer it from my another view controller?
Should I include the left menu view in every view controllers or is there any other smart ways to achieve this?
Use MMDrawer controller library which is best suitable for you and easy to integrate. Which can provide you left drawer and right drawer and which you can use in multiple controller.
Also you can manage these 2 components in 2 different VC so it will be easy to manage code.
To integrate follow this link:
https://github.com/mutualmobile/MMDrawerController
I recommend checking out this AppCoda tutorial. This tutorial explains how to use the SWRevealViewController, which is a "A UIViewController subclass for revealing a rear (left and/or right) view controller behind a front controller". Both the Github page and the AppCoda tutorial explain on how to implement this side menu. This solution is super simple and very reusable!
UPDATE: Added more context around the external link.
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
I am new to xcode and IOS (and this board. First post).
I am completely flummoxed by a design problem and unsure how to approach.
I have three buttons, each of which calls a new array of pages that need to navigate horizontally with swipe gestures and have their own buttons.
The three buttons in the parent work exactly like a tab bar except they have to be bigger and higher than a tab bar would be. The called page arrays mostly work like a pageviewcontroller except that the pages need to have a button/indicator below to allow non sequential navigation. The target HAS TO LOAD WITH A SEGUE.
The problem I'm encountering is that using a modal segue to load a pageviewcontroller and prepareForSegue to keep the master/parent view controller visible results in my buttons being inaccessible. I assume its because I cant click thought the child view controller.
Secondly, I don't know if its possible to customize the page indicator dots of a pageviewcontroller so they can look like a bar with graphics.
Here are my specific questions:
Is it possible to load a view controller with a modal segue and still access my buttons? Can the child be resized?
can i customize the buttons/indicators in a pageviewcontroller. Can you point me to some code?
should navigation like this be done with some completely different approach? What about a view controller container?
Here's a diagram (cant post images directly yet)
I've found the answer to my second question: It seems that pageViewController's indicators are not customizable in any way. This rules out pageViewController for what I need.
9 Views in 10 hours. Is this not the best forum for questions like this or is there something wrong with my post?