{"action":"created","issue":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/612","repository_url":"https://api.github.com/repos/CosmicMind/Material","labels_url":"https://api.github.com/repos/CosmicMind/Material/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/CosmicMind/Material/issues/612/comments","events_url":"https://api.github.com/repos/CosmicMind/Material/issues/612/events","html_url":"https://github.com/CosmicMind/Material/issues/612","id":191804675,"number":612,"title":"SnackbarController fails to layout its rootViewController's height correctly","user":{"login":"timoschwarzer","id":8849554,"avatar_url":"https://avatars.githubusercontent.com/u/8849554?v=3","gravatar_id":"","url":"https://api.github.com/users/timoschwarzer","html_url":"https://github.com/timoschwarzer","followers_url":"https://api.github.com/users/timoschwarzer/followers","following_url":"https://api.github.com/users/timoschwarzer/following{/other_user}","gists_url":"https://api.github.com/users/timoschwarzer/gists{/gist_id}","starred_url":"https://api.github.com/users/timoschwarzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoschwarzer/subscriptions","organizations_url":"https://api.github.com/users/timoschwarzer/orgs","repos_url":"https://api.github.com/users/timoschwarzer/repos","events_url":"https://api.github.com/users/timoschwarzer/events{/privacy}","received_events_url":"https://api.github.com/users/timoschwarzer/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":"open","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":5,"created_at":"2016-11-26T12:52:50Z","updated_at":"2016-11-27T20:28:18Z","closed_at":null,"body":"My setup is:\r\n\r\n- Window\r\n  - NavigationDrawerController\r\n    - ToolbarController\r\n      - SnackbarController\r\n        - my view controllers\r\n\r\nI'm changing my view controllers by calling `.transition(to: targetViewController)` on the SnackbarController.\r\nThe problem I have is that my view controllers have the wrong height.\r\n\r\nI've debugged some bounds:\r\n```swift\r\n// Screen's bounds\r\nprint(Screen.bounds)\r\n// The SnackbarController's view's bounds\r\nprint(toolbarController?.rootViewController.view.bounds as! CGRect)\r\n// The bounds of my view controller's view\r\nprint((toolbarController?.rootViewController as! AppSnackbarController).rootViewController.view.bounds)\r\n```\r\n\r\nThe output was:\r\n```\r\n(0.0, 0.0, 768.0, 1024.0)\r\n(0.0, 0.0, 768.0, 955.0)\r\n(0.0, 0.0, 768.0, 1162.0) // This should be 955, right?\r\n```\r\n\r\nAnd it even becomes more weird: If change my view controller using .transition, the new view controller's height increases by 138 everytime. (It's 138 on all devices)\r\nSo if I change my view controller, it outputs:\r\n```\r\n(0.0, 0.0, 768.0, 1024.0)\r\n(0.0, 0.0, 768.0, 955.0)\r\n(0.0, 0.0, 768.0, 1300.0)\r\n```\r\n\r\nAnd if I change it again, it outputs:\r\n```\r\n(0.0, 0.0, 768.0, 1024.0)\r\n(0.0, 0.0, 768.0, 955.0)\r\n(0.0, 0.0, 768.0, 1438.0)\r\n```\r\n\r\nMaybe you can take a look...\r\nThanks!\r\n\r\n- Timo"},"comment":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/comments/263145299","html_url":"https://github.com/CosmicMind/Material/issues/612#issuecomment-263145299","issue_url":"https://api.github.com/repos/CosmicMind/Material/issues/612","id":263145299,"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-11-27T20:28:18Z","updated_at":"2016-11-27T20:28:18Z","body":"I understand that. The frame doesn't get increased by any factor, rather it is made the same as the previous that is being transitioned from. \r\n\r\n```swift\r\nviewController.view.frame = rootViewController.view.frame\r\n```\r\n\r\nIf you can share a sample that replicates this, that would be great. You are placing this inside a `TabBarController`, which does alter the size of UIViewControllers that are within it. Now I am not blaming that, but it is the only item that stands our right away. The `RootController` manages all navigation controller types (`ToolbarController`, `MenuController`, `PageTabBarController`, `SnackbarController`, etc... ) So I would suspect that the issue would manifest in all those too if there was an increase being set within the `RootController`. \r\n\r\nThis is where a sample project that replicates the issue would be very helpful.  "}}
{"actor":{"display_login":"danieldahan"}}