Skip to content

Instantly share code, notes, and snippets.

@pgherveou
Created April 20, 2015 13:35
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 pgherveou/9c9ecb5b3a83d7e2a87e to your computer and use it in GitHub Desktop.
Save pgherveou/9c9ecb5b3a83d7e2a87e to your computer and use it in GitHub Desktop.
View Controller code style template
import Foundation
import UIKit
class <#name#>: UIViewController {
// MARK: static properties
struct statics {
static let someValue = 1
static let someOtherValue = "foo"
}
// MARK: IBOutlets
@IBOutlet weak var someLabel: UILabel!
@IBOutlet weak var someButton: UIButton!
// MARK: properties
var someProperty = "..."
// MARK: Livecycle
override func viewDidLoad() {
// some custom loading code
// REMOVE me if noop
}
override func viewDidAppear(animated: Bool) {
// some custom loading code
// REMOVE me if noop
}
// MARK: static methods
static func someStaticMethod() {
}
// MARK: methods
func someStaticMethod() {
}
// MARK: private methods
private func somePrivateMethod() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment