{"action":"created","issue":{"url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/291","labels_url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/291/comments","events_url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/291/events","html_url":"https://github.com/futuretap/InAppSettingsKit/issues/291","id":56804769,"number":291,"title":"title not being set properly in child views","user":{"login":"mournblade","id":3775802,"avatar_url":"https://avatars.githubusercontent.com/u/3775802?v=3","gravatar_id":"","url":"https://api.github.com/users/mournblade","html_url":"https://github.com/mournblade","followers_url":"https://api.github.com/users/mournblade/followers","following_url":"https://api.github.com/users/mournblade/following{/other_user}","gists_url":"https://api.github.com/users/mournblade/gists{/gist_id}","starred_url":"https://api.github.com/users/mournblade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mournblade/subscriptions","organizations_url":"https://api.github.com/users/mournblade/orgs","repos_url":"https://api.github.com/users/mournblade/repos","events_url":"https://api.github.com/users/mournblade/events{/privacy}","received_events_url":"https://api.github.com/users/mournblade/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-06T12:11:53Z","updated_at":"2015-02-25T23:01:16Z","closed_at":null,"body":"Hi, \r\n\r\ni have a situation where i need to do some different stuff in my child views. I have concluded that the best (only?) way is for me to check the \"title\" in viewdidload when the child view is loaded, like this:\r\n\r\nif([self.title isEqualToString:MY_SPECIAL_CHILD_VIEW]){\r\n           //fetch data from my server\r\n        }\r\n\r\nHowever, there is a problem with your IASKAppSettingsViewController code, starting at row 710:\r\n\r\ntargetViewController.delegate = self.delegate;\r\ntargetViewController.delegate = self.delegate;\r\ntargetViewController.settingsStore = self.settingsStore;\r\n----PROBLEM targetViewController.file = specifier.file;\r\ntargetViewController.hiddenKeys = self.hiddenKeys;\r\ntargetViewController.title = specifier.title;\r\n\r\nWhen you set the file, the 'setFile' method gets called. And on row 95 in that method:\r\nself.tableView.contentOffset = CGPointMake(0, 0);\r\n\r\nSetting the contentOffset causes the view to load, resulting in that ViewDidLoad gets called BEFORE hidden keys, or even more importantly, the title gets set to the key, since that happens two rows below.\r\nSince those then always will be nil, i can't use them.\r\n\r\nIt would be great if at least those two rows could get moved up before the file row so that it has the correct title when viewdidload gets called."},"comment":{"url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/comments/76080437","html_url":"https://github.com/futuretap/InAppSettingsKit/issues/291#issuecomment-76080437","issue_url":"https://api.github.com/repos/futuretap/InAppSettingsKit/issues/291","id":76080437,"user":{"login":"futuretap","id":110374,"avatar_url":"https://avatars.githubusercontent.com/u/110374?v=3","gravatar_id":"","url":"https://api.github.com/users/futuretap","html_url":"https://github.com/futuretap","followers_url":"https://api.github.com/users/futuretap/followers","following_url":"https://api.github.com/users/futuretap/following{/other_user}","gists_url":"https://api.github.com/users/futuretap/gists{/gist_id}","starred_url":"https://api.github.com/users/futuretap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuretap/subscriptions","organizations_url":"https://api.github.com/users/futuretap/orgs","repos_url":"https://api.github.com/users/futuretap/repos","events_url":"https://api.github.com/users/futuretap/events{/privacy}","received_events_url":"https://api.github.com/users/futuretap/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T23:01:16Z","updated_at":"2015-02-25T23:01:16Z","body":"Why don't you overwrite `-setFile:` in your subclass? Relying on the title being already set in viewDidLoad is not recommended."}}