{"action":"created","issue":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/466","repository_url":"https://api.github.com/repos/CosmicMind/Material","labels_url":"https://api.github.com/repos/CosmicMind/Material/issues/466/labels{/name}","comments_url":"https://api.github.com/repos/CosmicMind/Material/issues/466/comments","events_url":"https://api.github.com/repos/CosmicMind/Material/issues/466/events","html_url":"https://github.com/CosmicMind/Material/issues/466","id":167251203,"number":466,"title":"View offset after pushing SearchBarController","user":{"login":"zbury","id":8207123,"avatar_url":"https://avatars.githubusercontent.com/u/8207123?v=3","gravatar_id":"","url":"https://api.github.com/users/zbury","html_url":"https://github.com/zbury","followers_url":"https://api.github.com/users/zbury/followers","following_url":"https://api.github.com/users/zbury/following{/other_user}","gists_url":"https://api.github.com/users/zbury/gists{/gist_id}","starred_url":"https://api.github.com/users/zbury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbury/subscriptions","organizations_url":"https://api.github.com/users/zbury/orgs","repos_url":"https://api.github.com/users/zbury/repos","events_url":"https://api.github.com/users/zbury/events{/privacy}","received_events_url":"https://api.github.com/users/zbury/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-24T20:01:25Z","updated_at":"2016-07-24T20:20:46Z","closed_at":null,"body":"I have a subclassed (material) NavigationController with a rootViewController that consist of a table view laid out using view.layout(tableView).edges(). On cell selection, I push a subclassed SearchBarController. On navigating back, however, the table view re-positions about an inch (in the simulator) from the top of the navigation bar. This does not occur when pushing a normal UIViewController subclass. On inspecting the view, I see that the UITableViewWrapperView is a different height than the UITableView I have. Could be something to do with the space taken up by the searchBarController searchBar not getting reset when the view disappears?\r\n\r\nI found [this](http://stackoverflow.com/questions/27671324/uitableviewwrapperview-and-uitableview-size-differs-with-autolayout) on stack overflow and have managed to prevent the extra space by setting the table view contentInset and scrollIndicatorInsets to UIEdgeInsetZero in viewWillLayoutSubviews(). However, this is not ideal, and causes an irregularity in animations as the rootViewController reappears. Instead of sliding to the right with the rest of the view (as it does after pushing a normal UIViewController subclass), it appears to slide *down* and to the right. Would love a way for the animation \"back a view\" to be as expected."},"comment":{"url":"https://api.github.com/repos/CosmicMind/Material/issues/comments/234799725","html_url":"https://github.com/CosmicMind/Material/issues/466#issuecomment-234799725","issue_url":"https://api.github.com/repos/CosmicMind/Material/issues/466","id":234799725,"user":{"login":"chashmeetsingh","id":8962264,"avatar_url":"https://avatars.githubusercontent.com/u/8962264?v=3","gravatar_id":"","url":"https://api.github.com/users/chashmeetsingh","html_url":"https://github.com/chashmeetsingh","followers_url":"https://api.github.com/users/chashmeetsingh/followers","following_url":"https://api.github.com/users/chashmeetsingh/following{/other_user}","gists_url":"https://api.github.com/users/chashmeetsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/chashmeetsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chashmeetsingh/subscriptions","organizations_url":"https://api.github.com/users/chashmeetsingh/orgs","repos_url":"https://api.github.com/users/chashmeetsingh/repos","events_url":"https://api.github.com/users/chashmeetsingh/events{/privacy}","received_events_url":"https://api.github.com/users/chashmeetsingh/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T20:20:45Z","updated_at":"2016-07-24T20:20:45Z","body":"why not try view.layout(tableView).edges() inside `viewDidAppear()` ? @zbury  "}}
{"actor":{"display_login":"chashmeetsingh"}}