Skip to content

Latest commit

 

History

History
188 lines (126 loc) · 5.77 KB

UIViewController_Lifecycle.md

File metadata and controls

188 lines (126 loc) · 5.77 KB

Swift UIViewController Interview Questions (Beginner to Advanced)

Beginner Level

  1. What is the UIViewController lifecycle in iOS?
    Answer coming soon...

  2. What are the basic methods in a UIViewController lifecycle?
    Answer coming soon...

  3. What is viewDidLoad(), and when is it called?
    Answer coming soon...

  4. What is viewWillAppear(), and when is it called?
    Answer coming soon...

  5. What is viewDidAppear()?
    Answer coming soon...

  6. What is viewWillDisappear(), and when should you use it?
    Answer coming soon...

  7. What is viewDidDisappear()?
    Answer coming soon...

  8. How do you properly initialize a view controller in Swift?
    Answer coming soon...

  9. How do you handle memory warnings in a view controller?
    Answer coming soon...

  10. What is viewWillLayoutSubviews() used for?
    Answer coming soon...

  11. What is the UIViewController Lifecycle?
    Answer coming soon...

  12. What methods are called when a view controller is initialized?
    Answer coming soon...

  13. What does viewDidLoad do, and when is it called?
    Answer coming soon...

  14. What is the purpose of viewWillAppear?
    Answer coming soon...

  15. When is viewDidAppear called?
    Answer coming soon...

  16. What happens during viewWillDisappear?
    Answer coming soon...

  17. What is viewDidDisappear, and when is it invoked?
    Answer coming soon...

  18. How do you handle memory warnings in viewDidReceiveMemoryWarning?
    Answer coming soon...

  19. What is the importance of init(coder:)?
    Answer coming soon...

  20. What is the role of awakeFromNib in a view controller?
    Answer coming soon...


Intermediate Level

  1. What is loadView() in a view controller lifecycle?
    Answer coming soon...

  2. How do you handle layout updates in viewWillLayoutSubviews() and viewDidLayoutSubviews()?
    Answer coming soon...

  3. How does a view controller handle rotation and orientation changes?
    Answer coming soon...

  4. How do you handle navigation between view controllers?
    Answer coming soon...

  5. What is the difference between present and push view controllers?
    Answer coming soon...

  6. How do you dismiss a view controller?
    Answer coming soon...

  7. How do you pass data between view controllers?
    Answer coming soon...

  8. How do you customize transitions between view controllers?
    Answer coming soon...

  9. How do you handle dynamic updates in viewDidLayoutSubviews()?
    Answer coming soon...

  10. How do view controllers handle child view controllers?
    Answer coming soon...

  11. How do you implement view controller containment?
    Answer coming soon...

  12. What is the role of viewWillLayoutSubviews?
    Answer coming soon...

  13. What happens in viewDidLayoutSubviews?
    Answer coming soon...

  14. How do you manage data when a view controller appears?
    Answer coming soon...

  15. How do you handle orientation changes in view controllers?
    Answer coming soon...

  16. What is the difference between viewWillAppear and viewDidAppear?
    Answer coming soon...

  17. How do you pass data between view controllers during lifecycle events?
    Answer coming soon...

  18. How do you implement custom transitions in view controllers?
    Answer coming soon...

  19. What is the significance of traitCollectionDidChange?
    Answer coming soon...

  20. How do you handle deep linking with view controllers?
    Answer coming soon...


Advanced Level

  1. How does view controller containment work?
    Answer coming soon...

  2. How do you implement custom animations for view controller transitions?
    Answer coming soon...

  3. How do you manage the view controller hierarchy?
    Answer coming soon...

  4. How do you optimize view controller performance during heavy animations?
    Answer coming soon...

  5. How do you implement modal presentations with custom configurations?
    Answer coming soon...

  6. How do you handle lifecycle events for view controllers embedded in UIPageViewController or UITabBarController?
    Answer coming soon...

  7. What is the view controller’s role in managing the responder chain?
    Answer coming soon...

  8. How do you handle beginAppearanceTransition() and endAppearanceTransition() for view controllers?
    Answer coming soon...

  9. How do you manage memory in view controllers during transitions?
    Answer coming soon...

  10. How do willMove(toParent:) and didMove(toParent:) work in child view controllers?
    Answer coming soon...

  11. How do you implement view controller lifecycle in a navigation controller?
    Answer coming soon...

  12. What is the role of prepare(for:sender:) in the view controller lifecycle?
    Answer coming soon...

  13. How do you optimize performance during view controller transitions?
    Answer coming soon...

  14. How do you manage background tasks during view controller lifecycles?
    Answer coming soon...

  15. How do you implement UIViewControllerTransitioningDelegate for custom transitions?
    Answer coming soon...

  16. What is the difference between a modal presentation and a push transition?
    Answer coming soon...

  17. How do you track user interactions across view controller lifecycles?
    Answer coming soon...

  18. What is loadView and when should you override it?
    Answer coming soon...

  19. How do you save and restore the state of a view controller?
    Answer coming soon...

  20. How do you implement analytics tracking within the UIViewController lifecycle?
    Answer coming soon...