Created
December 5, 2014 23:14
-
-
Save acrosa/fd1e5aeeccafeb1d1a6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ClassProtocol | |
| { | |
| var property: SomePropertyProtocol? { get set } | |
| } | |
| protocol SomePropertyProtocol | |
| { | |
| } | |
| class SomeClass : ClassProtocol | |
| { | |
| var property: SomePropertyProtocol? | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Best I can do:
If you can, I will use a little protocol helper and call it a day:
You can add this protocol (a tag) in an extension for classes like
UIViewif you need.The truth is that
protocol<>should actually betype<>and work for real types...