Last active
December 14, 2015 23:37
-
-
Save adamkuipers/6330b53b8b025a3a7717 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
import UIKit | |
protocol Bar { | |
var layoutOrientation: NSTextLayoutOrientation { get } | |
} | |
extension Bar { | |
var layoutOrientation: NSTextLayoutOrientation { | |
return .Horizontal | |
} | |
} | |
class Foo: NSTextLayoutOrientationProvider, Bar {} | |
func showOrientation(provider: NSTextLayoutOrientationProvider) -> NSTextLayoutOrientation { | |
return provider.layoutOrientation | |
} | |
showOrientation(Foo()) | |
/** | |
2015-12-14 15:36:35.943 Protocols[77955:7131216] *** NSForwarding: warning: object 0x7fa592426b40 of class '__lldb_expr_328.Foo' does not implement methodSignatureForSelector: -- trouble ahead | |
Unrecognized selector -[__lldb_expr_328.Foo layoutOrientation] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment