viewdidappear
Remembering scroll position on UITableView
See here you have to first save the scrolled position of tableView i.e. contentOffset of tableView and then reuse it when you are coming back to tableView. 1)When and where you will save it : When : At the point, when you are drilling down to detailViewController save the contentOffset of tableView How : float … Read more
Android’s viewDidLoad and viewDidAppear equivalent
The Activity class has onCreate and onResume methods that are pretty analagous to viewDidLoad and viewDidAppear. Activity.onResume EDIT To add to this, since some have mentioned in the comments that the view tree is not yet fully available during these callbacks, there is the ViewTreeObserver that you can listen to if you need first access … Read more
viewDidAppear for UITableViewCell
The UITableViewDelegate has these functions: func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath) The cell itself does not have callbacks for this.
Unable to set frame correctly before viewDidAppear
viewDidLoad is called when the class is loaded however no ui elements have been initialised and therefore any attempt to reference them will be overwritten or unavaliable during the initialisation process which happens between the viewDidLoad and viewDidAppear calls. Once all ui element have been initalised and drawn viewDidAppear is called. viewDidLoad – Called after … Read more