Created
March 24, 2017 18:42
-
-
Save mataspetrikas/fc23fe61ef46ad7043767b28bd79b3a2 to your computer and use it in GitHub Desktop.
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
enum BooType { | |
case play | |
} | |
protocol FooDelegate { | |
func onBoo(boo: BooType) | |
} | |
class Foo { | |
var delegate: FooDelegate? | |
func someFunc() { | |
delegate?.onBoo(boo: .play) | |
} | |
} | |
// some other file | |
class Bar: FooDelegate { | |
func onBoo(boo: BooType) { | |
switch boo { | |
case .play { | |
// is this possible? | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment