Remove unused code in viewDidAppear