简体   繁体   English

iOS如何在AppDelegate中以编程方式设置侧边栏菜单?

[英]iOS How to set a Sidebar Menu programmatically in the AppDelegate?

I am looking for a possibility to set a sidebar menu programmatically in the AppDelegate. 我正在寻找一种在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. 当按下按钮时,UIView出现在左侧。 A Collection of ViewControllers where initialized in the AppDelegate. 在AppDelegate中初始化的ViewController的集合。 they should then appear in the sidebar menu. 然后应将其显示在侧边栏菜单中。

Here is a mockup of how I imagine it: 这是我的想象模型:

http://i.stack.imgur.com/iBI53.png 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.. 这是大多数iOS应用程序中使用的世界著名的滑块(DrawerController)代码。

https://github.com/mutualmobile/MMDrawerController 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. 如果您不想使用它(我认为您应该),则有很多方法可以实现它,但是这需要时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM