{"action":"opened","issue":{"url":"https://api.github.com/repos/avikhairgavepatil/InterView-Question-/issues/25","repository_url":"https://api.github.com/repos/avikhairgavepatil/InterView-Question-","labels_url":"https://api.github.com/repos/avikhairgavepatil/InterView-Question-/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/avikhairgavepatil/InterView-Question-/issues/25/comments","events_url":"https://api.github.com/repos/avikhairgavepatil/InterView-Question-/issues/25/events","html_url":"https://github.com/avikhairgavepatil/InterView-Question-/issues/25","id":395809290,"node_id":"MDU6SXNzdWUzOTU4MDkyOTA=","number":25,"title":"Difference between viewdidload and viewwillappear?","user":{"login":"avikhairgavepatil","id":26653334,"node_id":"MDQ6VXNlcjI2NjUzMzM0","avatar_url":"https://avatars0.githubusercontent.com/u/26653334?v=4","gravatar_id":"","url":"https://api.github.com/users/avikhairgavepatil","html_url":"https://github.com/avikhairgavepatil","followers_url":"https://api.github.com/users/avikhairgavepatil/followers","following_url":"https://api.github.com/users/avikhairgavepatil/following{/other_user}","gists_url":"https://api.github.com/users/avikhairgavepatil/gists{/gist_id}","starred_url":"https://api.github.com/users/avikhairgavepatil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avikhairgavepatil/subscriptions","organizations_url":"https://api.github.com/users/avikhairgavepatil/orgs","repos_url":"https://api.github.com/users/avikhairgavepatil/repos","events_url":"https://api.github.com/users/avikhairgavepatil/events{/privacy}","received_events_url":"https://api.github.com/users/avikhairgavepatil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-04T04:56:09Z","updated_at":"2019-01-04T04:56:09Z","closed_at":null,"author_association":"OWNER","body":"Ans : \r\n\r\n\r\nViewDidLoad - It is excecuted once. So writer settings like set label text in ViewDidLoad.\r\nViewWillAppear - It is called every time when view appear.\r\n\r\n\r\nViewDidLoad - It is called when view is begin constructed.\r\nViewWillAppear - When view is about ready to appear.\r\n\r\n\r\nViewDidLoad :  It is automatically called when view controller completely loaded into memory. Override this method to perform additional initialization on views that were loaded from xib.\r\nI.e instance variable initialization, database access, network request\r\nViewWillAppear :  It is called when View is about to added on view hierachy. If we want to change some, then we have to override this method.Like change orientation, change screen data.\r\n\r\n\r\nSuppose your tableview data will be changed periodically. Then you have to write [tableview reloaddata] in ViewWillApper."}}
{"actor":{"display_login":"avikhairgavepatil"}}