Created
June 19, 2015 12:34
-
-
Save hartbit/22269b9fe700ff2de8ab to your computer and use it in GitHub Desktop.
Cannot invoke 'assert' with an argument list of type '(Bool, String)'
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
| extension UIView { | |
| var firstSubview: UIView? { | |
| if let firstSubview = self.subviews.first as? UIView { | |
| assert(firstSubview != nil, "ASSERT COMPILATION ERROR") | |
| return firstSubview | |
| } else { | |
| return nil | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment