I have a very simple subclass of UITextView that adds the "Placeholder" functionality that you can find native to the Text Field object. Here is my code for the su
Actually if you have some old user defined attributes (which is not valid for current view) at any view in your storyboard, that may cause your agent to crash.
Besides, sometimes it happens just because of a nasty bug of Xcode. To check it out, when you're at storyboard uncheck Editor > Automatically Refresh Views, then move to another file, clean and restart your project. After you entered storyboard again, you can click Editor > Refresh Views and check automatic one again. That one also solved my problem once.
If both didn't work, then probably you have done something wrong about your IBDesignable view, so choose your crashed views in storyboard and debug by clicking Editor > Debug Views
In my case it was somehow related to a carthage framework that I was using. I had to add $(PROJECT_DIR)/Carthage/Build/iOS to the Runpath Search Paths build setting
Add this script at the end of my Podfile
and performed pod install
again.
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
end
A major issue is when you are creating @IBDesignable make sure the cocoapod file isn't included in the UITests or else it will cause this crash.
I find the reason is your xib is not the same size as the design in storyboard. Make sure the xib has the same height and width.
There are crash reports generated when Interface Builder Cocoa Touch Tool crashes. Theses are located in ~/Library/Logs/DiagnosticReports
and named IBDesignablesAgentCocoaTouch_*.crash
. In my case they contained a useful stack-trace that identified the issue in my code.