I was using objective C class in swift for a scrolView. I created IBOutlet of that scroll view. And while compiling code this error started showing.
So to fix this kind of issue, import that class in your bridging header
import "YourClass.h"
I was using Xcode 9.2 with swift 3.2