You can try one of the following to figure out the cause:
- look for the
IBDesignablesAgentCocoaTouchlogs in this directory:
~/Library/Logs/DiagnosticReportsand see the cause.
Note: for user with Catalina: look for
IBDesignablesAgent-iOS_<DATE>-<MAC_NAME>.crash
-
Go to the Editor -> Debug Selected View while selecting your
@IBDesignable UIViewin your storyboard, and see the stack trace. -
Delete Derive Data folder.
Xcode Preference -> Location -> Derived Data /Users/YourMacName/Library/Developer/Xcode/DerivedData -
Clean your project
Shift+Command+Alt+K. -
Build your project
Command+B.