I am looking for a possibility to set a sidebar menu programmatically in the AppDelegate. I want to have a top navigation controller with a sidebar button on the left. when the button is pressed, a UIView appear of the left side. A Collection of ViewControllers where initialized in the AppDelegate. they should then appear in the sidebar menu.
Here is a mockup of how I imagine it:
http://i.stack.imgur.com/iBI53.png
Does anyone have an idea how to implement it?
many thanks in advance
best regards
moritz
This is the world famous slider (DrawerController) code used most of iOS apps..
https://github.com/mutualmobile/MMDrawerController
If you do not want to use it (I think you should) there are tons of ways to achieve it but it takes time.
Related
I am trying to create button click to present bottom sheet viewcontroller using storyboard not code base. View controller swipe down to dismiss viewcontroller with background light dark effect.
I tried below cocoapods but I didn’t get easy way.
https://github.com/gordontucker/FittedSheets
Please, give me some ideas how to achieve this by using Storyboard?
Might be too late but I juste released a Framework that does exactly what you need.
https://github.com/Que20/UIDrawer
It is a custom UIPresentationController, it doesn't affect you view controller presenting or the modal itself.
It support swipping and dragging (to deploy and close).
It is customizable.
Hope it'll help :)
We're creating an application with a design concept similar to Snapchat. On the base level, we have three Views that are supposed to be horizontally swipeable, with the camera view being in the middle.
The Views are also supposed to be selectable via a Tab Bar. While the views are being swiped, the transition should also manipulate the color of the Tab Bar aswell as the size of some elements on the Tab Bar, similar to how Snapchat does it:
Our UI Designer made a mockup for our specific application in Adobe XD:
The button has been made independent from the Tab Bar, as it is supposed to do some interaction with the controller beneath, even if the Tab Bar disappears.
I've been trying to figure out how to best implement a navigation like this for about 10 hours now. I've come as far as trying to create my own AnimationController for animating between Tabs coupled with a custom InteractionController, but those have been unsafe and buggy at best, and I still haven't figured out how to animate the button at the same time as the views.
Has anyone tried to implement a design similar to this and succeeded? Could you lead me in the right direction of which methodology to use to achieve a design like this?
Thanks in advance everyone.
In my app I use UINavigationController to navigate through hierarchy of views but I encountered a problem - I need to display a list of buttons (when pushed they go to a view controller) instead of the back button.
What is that functionality called? I know how to change the button title and functionality but don't know how to create this list (a good example of my question is the Facebook left bar which shows Friends and other stuff).
In general you're looking for a drawer. That's what it is usually called. There are many libraries/frameworks out there that implement it in a different way so there is no general approach how to "change back button to...".
Check for yourself:
ViewDeck
DDMenuController
PKRevealController
MMDrawerController
Though, here you will find a very good article about very unique way how to implement this "hamburger" icon feature. They provide nice research and you'll find some very interesting information there.
It seems that you need control like MMDrawerController for showing side menu.
Try to make modal segue or hide back button programmatically. Then you add your own button and configure it. Default back button only return you to previous view, you need to make your own.
As an iOS noob, I recently starting feeling pretty good about myself when my iOS productivity started looking good. Until... I tried to figure out how to combine a UITabBarController with MMDrawerController in a storyboard :-(
The app shows three tabs permanently along the bottom, and I want to add a right-side sliding menu to that, and ideally I want to do this in storyboard. I settled on MMDrawerController for the sliding menu.
Question 1: Is it even possible to point the first tab of the UITabBarController to a MMDrawerController? Or should it be the other way around: set up the MMDrawerController at the root, and have the center view be the tabbed screen?
For example, UITabBarController has to be the root view of the application. So, I tried setting up the MMDrawerController for the view of the first tab (as that's where I need it only anyway), but I was just not able to get it to work at all. All examples of how to integrate MMDrawerController into your project that I could find online, all set up the MMDrawerController at the root. To set up a tabbed screen as a sub view, it looks like you can't use UITabBarController, but need to mimic that yourself with UITabBar and regular UIViewControllers?
Question 2: Has anyone seen any examples or tutorials that combine a tabbed interface with the side sliding menu?
The UI used in the Facebook iPhone app is essentially what I'm trying to employ here: you can drag the side sliding menu and as you do that it pushes out the main view along with its fixed tabs at the bottom.
I'm totally overwhelmed and confused. I have no idea how to attack this. It also doesn't help that I'm totally new at Storyboards :-(
Any help, or just pointers are super appreciated...
Thanks,
Erik
here is a good tutorial to implement a sliding menu like facebook.
In my app I would like to have a way to make the user go to a website, but not leave my app.
I do that with a UIWebView.
I'd like to constantly have a "Back to app" button on the NavigationBar on the top.
The rest of the Web navigation (back, forward) should be on the top as well, but appear and disappear with the context.
The problem is that I don't know how to make the buttons appear on the UINavigationController.
How can this be done?
I have my UIWebViewDelegate set up to receive all the relevant functions, but the buttons don't appear.
EDIT: I need to solve this programmatically
As of iOS 5, there are leftBarButtonItems and rightBarButtonItems (note the plural) properties on UINavigationItem, so there's a way to have more buttons. It seems to me that these are only accessible programmatically, but not from Interface Builder.
If you can, my suggestion is to not just add the Web View as a subview, but to give it its own ViewController and push that on the Navigation Controller's stack. That'll give you your back button for free (that's kind of what UINavigationController was designed for, after all). And it should help you to keep the web browsing code separated form the other stuff in your app.
NB: in your case, you'll have set the leftItemsSupplementBackButton property of the Browser View Controller's navigationItem to YES to get the automatic back button (the details are in the documentation)
You can not have more than two buttons on the NavigationController's navbar without doing some tricks. There are two properties self.navigationItem.leftBarButtonItem and self.navigationItem.rightBarButtonItem. If not, add a custom view and place the buttons there. A good way to implement multiple buttons with multiple actions is shown here.