Skip to content

Instantly share code, notes, and snippets.

@hartbit
Created June 19, 2015 12:34
Show Gist options
  • Save hartbit/22269b9fe700ff2de8ab to your computer and use it in GitHub Desktop.
Save hartbit/22269b9fe700ff2de8ab to your computer and use it in GitHub Desktop.
Cannot invoke 'assert' with an argument list of type '(Bool, String)'
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