{"action":"created","issue":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/570","repository_url":"https://api.github.com/repos/CosmicMind/Material","labels_url":"https://api.github.com/repos/CosmicMind/Material/issues/570/labels{/name}","comments_url":"https://api.github.com/repos/CosmicMind/Material/issues/570/comments","events_url":"https://api.github.com/repos/CosmicMind/Material/issues/570/events","html_url":"https://github.com/CosmicMind/Material/issues/570","id":185675791,"number":570,"title":"MenuController messes up navigationItems","user":{"login":"Sufi-Al-Hussaini","id":7275476,"avatar_url":"https://avatars.githubusercontent.com/u/7275476?v=3","gravatar_id":"","url":"https://api.github.com/users/Sufi-Al-Hussaini","html_url":"https://github.com/Sufi-Al-Hussaini","followers_url":"https://api.github.com/users/Sufi-Al-Hussaini/followers","following_url":"https://api.github.com/users/Sufi-Al-Hussaini/following{/other_user}","gists_url":"https://api.github.com/users/Sufi-Al-Hussaini/gists{/gist_id}","starred_url":"https://api.github.com/users/Sufi-Al-Hussaini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sufi-Al-Hussaini/subscriptions","organizations_url":"https://api.github.com/users/Sufi-Al-Hussaini/orgs","repos_url":"https://api.github.com/users/Sufi-Al-Hussaini/repos","events_url":"https://api.github.com/users/Sufi-Al-Hussaini/events{/privacy}","received_events_url":"https://api.github.com/users/Sufi-Al-Hussaini/received_events","type":"User","site_admin":false},"labels":[{"id":251382996,"url":"https://api.github.com/repos/CosmicMind/Material/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":{"login":"danieldahan","id":9982123,"avatar_url":"https://avatars.githubusercontent.com/u/9982123?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldahan","html_url":"https://github.com/danieldahan","followers_url":"https://api.github.com/users/danieldahan/followers","following_url":"https://api.github.com/users/danieldahan/following{/other_user}","gists_url":"https://api.github.com/users/danieldahan/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldahan/subscriptions","organizations_url":"https://api.github.com/users/danieldahan/orgs","repos_url":"https://api.github.com/users/danieldahan/repos","events_url":"https://api.github.com/users/danieldahan/events{/privacy}","received_events_url":"https://api.github.com/users/danieldahan/received_events","type":"User","site_admin":false},"assignees":[{"login":"danieldahan","id":9982123,"avatar_url":"https://avatars.githubusercontent.com/u/9982123?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldahan","html_url":"https://github.com/danieldahan","followers_url":"https://api.github.com/users/danieldahan/followers","following_url":"https://api.github.com/users/danieldahan/following{/other_user}","gists_url":"https://api.github.com/users/danieldahan/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldahan/subscriptions","organizations_url":"https://api.github.com/users/danieldahan/orgs","repos_url":"https://api.github.com/users/danieldahan/repos","events_url":"https://api.github.com/users/danieldahan/events{/privacy}","received_events_url":"https://api.github.com/users/danieldahan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-10-27T13:57:12Z","updated_at":"2016-10-27T19:19:15Z","closed_at":"2016-10-27T19:19:15Z","body":"Hi Daniel,\r\n\r\nI'm migrating my project to Swift 3. I was using a `Menu` with `FabButtons` before and I'm trying to change it to the new `MenuViewController` approach.\r\n```\r\nfabMenu = Menu(origin: ...)\r\nfabMenu.direction = .Up\r\nfabMenu.views = [btn1, btn2, ...]\r\n```\r\n\r\nNow, I'm still using `FabButtons` (instead of `MenuItems`) and do:\r\n```\r\nguard let mc = menuController as? ACCMenuController else {\r\n    return\r\n}\r\n\r\nmc.menu.delegate = self\r\nmc.menu.views = [btn1, btn2, ...]\r\n```\r\n\r\nI'm using your `MenuController` project in `Samples` as reference. I see that you are setting the `rootViewController` as an instance of `AppMenuController(rootViewController:)`:\r\n\r\n```\r\nwindow!.rootViewController = AppMenuController(rootViewController: RootViewController())\r\n```\r\n\r\nHowever, when I do this, my `navigationItems` don't show up. And if I don't, the `Menu` doesn't show up (as expected).\r\n\r\nHow can I solve this?\r\n\r\n---\r\n\r\nXcode version: 8.1 GM\r\niOS target version: 9.3\r\nMaterial release: 2.2.5"},"comment":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/comments/256742449","html_url":"https://github.com/CosmicMind/Material/issues/570#issuecomment-256742449","issue_url":"https://api.github.com/repos/CosmicMind/Material/issues/570","id":256742449,"user":{"login":"danieldahan","id":9982123,"avatar_url":"https://avatars.githubusercontent.com/u/9982123?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldahan","html_url":"https://github.com/danieldahan","followers_url":"https://api.github.com/users/danieldahan/followers","following_url":"https://api.github.com/users/danieldahan/following{/other_user}","gists_url":"https://api.github.com/users/danieldahan/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldahan/subscriptions","organizations_url":"https://api.github.com/users/danieldahan/orgs","repos_url":"https://api.github.com/users/danieldahan/repos","events_url":"https://api.github.com/users/danieldahan/events{/privacy}","received_events_url":"https://api.github.com/users/danieldahan/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T19:19:15Z","updated_at":"2016-10-27T19:19:15Z","body":"Hi @Sufi-Al-Hussaini Yes, I can help. \r\n\r\nSo the latest Menu, MenuView, and MenuViewController have all been consolidated into Menu and MenuController. \r\n\r\nOriginally, there was a control called Menu that was wrapped by a UIView called MenuView. Now they are together in a single View object called Menu. \r\n\r\nIf you would like, you are able to place that in your current UIViewController as a subview, and then add the `baseSize`, `itemSize`, and `views` appropriately. This will avoid the issue you are having with `navigationItems` because the UIVIewController is the same. \r\n\r\nIf you choose to use the `MenuController`, then you are introducing a new UIViewController that takes your current one and sets it as the child. In this case you would need to set the `navigationItems` within a subclass of the MenuController and in the `rootViewController` you would place the other subviews as before. \r\n\r\nThe reason Material works this way, is to allow you to layer or stack the controls like MenuController, ToolbarController into organized pieces that are perceived to work all together. This removes a lot of coupling. \r\n\r\nI hope this helps. Please reopen or create a new issue if you need :) All the best!"}}
{"actor":{"display_login":"danieldahan"}}