Skip to content

Instantly share code, notes, and snippets.

@toddkramer
Last active August 29, 2015 14:12
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 toddkramer/18e01556cf9cb7750245 to your computer and use it in GitHub Desktop.
Save toddkramer/18e01556cf9cb7750245 to your computer and use it in GitHub Desktop.
SwiftInitializers03-Person.swift
class Person: NSObject {
let firstName: String
let lastName: String
let middleInitial: String
let title: String
init(firstName: String = "First", lastName: String = "Last",
middleInitial: String = "", title: String = "") {
self.firstName = firstName
self.lastName = lastName
self.middleInitial = middleInitial
self.title = title
super.init()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment