Swift 4:
I was getting this error because of a change in the UIVisualEffectView api. In Swift 3 it was ok to do this:
myVisuallEffectView.addSubview(someSubview)
But in Swift 4 I had to change it to this:
myVisualEffectView.contentView.addSubview(someSubview)