Skip to content

Instantly share code, notes, and snippets.

@carlosypunto carlosypunto/gist.swift
Last active Apr 19, 2016

Embed
What would you like to do?
Swift 2 Abstarct Class
protocol MyInterface {
func myMethod() -> String
}
extension MyInterface {
func myMethod() -> String {
fatalError("Not Implemented")
}
}
class MyConcreteClass: MyInterface {
func myMethod() -> String {
return "The output"
}
}
MyConcreteClass().myMethod()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.