Skip to content

Instantly share code, notes, and snippets.

@izackp
Last active July 10, 2019 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save izackp/1291670c80306c7b7ad03c07c7d46ff5 to your computer and use it in GitHub Desktop.
Save izackp/1291670c80306c7b7ad03c07c7d46ff5 to your computer and use it in GitHub Desktop.
Small example of ViewController organization that I can refer to, so my code can be more consistent.
class VCExample: BaseViewController {
// IBOutlets
// MARK: - Public Vars
// MARK: - Private Vars
// MARK: - Init
// MARK: - View Lifecycle
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: - Overrides
// MARK: - Actions
func configureTable() {}
// MARK: - Actions Navigation
func showGallery() {}
// MARK: - Actions API
func apiGetTableData() {}
// MARK: - User Input
@IBAction func onTapItemInTable() {}
// MARK: - Queries
// MARK: - Events (Callbacks)
func recievedTableData() {}
// MARK: - Delegate X (Callbacks)
// MARK: - Factories (Static constructors)
static func buildSpecializedView() -> UIView {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment