Reputation:
Lets say I connect an weak var myView: UIImageView!
outlet to an UIImageView
instance in my XIB or Storyboard. Later I change the view class in IB to UIView
. The outlet will still be connected without giving a warning or compile time error.
Can I somehow automatically detect such errors?
Upvotes: 1
Views: 28
Reputation: 827
UIView is parent class of UIImageView, so you can connect UIImageView with UIView but you can't connect a UIView to UIImageView. So technically, it is not an error.
Upvotes: 2