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
For me it was a missing signing certificate, because I never ran the app, so Xcode did not yet create a certificate. Once I ran the app, the IBDesignable
rendering worked fine.
In my case, it was a problem with OneSignal. Apparently, they have a bug within the version 2.2.0 and above. Switched to 2.1.6 and everything's great again!
Check out this.
I have had the same issue a couple of times. Both times it started when I was loading an IBDesignable nib onto the storyboard when the nib was not able to fit on the view (ie I had a button off of the UIView but still in the nib). Once I fixed that Xcode still gave me errors so I restarted Xcode until it randomly stopped giving me the error.
I hope this helps.
UPDATE: I just killed all processes named "Interface Builder Cocoa Touch Tool", restarted Xcode and the error went away. Don't know if this will always work or not.
You could select your custom view in Interface Builder and then use
Editor
, Debug Selected Views
. It will launch so-called IBDesignableAgentCocoaTouch
debug session when all breakpoints (including exception breakpoints) work and you could exactly identify the place your view crashes.