In a viewController
usually there are many methods. In order make this part organized well. Here are the rules:
// MARK: - Life cycle
For viewDidLoad
etc. methods about life cycle should in this part:
// MARK: - UI configuration methods
Only configure UI elements method: (This part could be refactored in the short future)
// MARK: - Actions and gestures
Actions and gestures
// MARK: - xxx Delegate methods
Delegate methods
//Ignore this: Common logic stuff should be in viewModel
example