Skip to content

Instantly share code, notes, and snippets.

@konrad1977
Created November 4, 2014 07:49
Show Gist options
  • Save konrad1977/0d603cb1fee4b0e852b1 to your computer and use it in GitHub Desktop.
Save konrad1977/0d603cb1fee4b0e852b1 to your computer and use it in GitHub Desktop.
Example using class method in protocol
protocol FileSaver {
class func savePath() -> String
func saveFile()
var isSaved: Bool { set get }
}
class VideoDocumentStorage : FileSave {
class func savePath() { "Videopath" }
func saveFile() {
//Save file using savePath()
self.isSaved = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment