Guest User

Untitled

a guest
Oct 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class Superclass<T: UIView>: UIViewController { ... }
  2.  
  3. class Subclass: Superclass<UIButton> { ... }
  4.  
  5. let childViewController: Superclass<UIView>?
  6. switch type {
  7. case .typeOne:
  8. childViewController = Subclass()
  9. default:
  10. childViewController = nil
  11. }
  12.  
  13. Cannot assign value of type 'Subclass' to type 'Superclass<UIView>?'
Add Comment
Please, Sign In to add comment