Created
November 4, 2014 07:49
-
-
Save konrad1977/0d603cb1fee4b0e852b1 to your computer and use it in GitHub Desktop.
Example using class method in protocol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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