When I write my own UIButton-extended class and make it @IBDesignable, I receive two errors in Interface Builder, namely:
In Xcode 7.3, none of the above solutions worked for me, but the accepted answer to this question did: Failed to render instance of IB Designables
- Clear Xcode derived data for the project. They are in ~/Library/Developer/Xcode/DerivedData
- Clean your current build by pressing ⌘⇧K
- Build your project
- In storyboard go to Editor menu and do Refresh All Views; wait for build to be completed and errors should be gone
I did not need to do the 4th step to solve the problem (and get my PaintCode-drawRect'd UIView to paint in the storyboard), included here just in case.
Credit to @Mojtaba and @WeZZard