I am trying to subclass my UIButton on my Storyboard with a custom swift class that should show the button as a custom Hamburger Button.
I am getting this warning and not seeing the Hamburger button being rendered in Interface Builder, although it will intermittently work.
The Custom class is called NTHamburgerButton, I don't know why the string on characters is appearing before the class name.
IB Designables: Using class UIButton for object with custom class because the class _TtC6CProjectName17NTHamburgerButton does not exist.
I've encounter the same problem, and I found an answer from other question: enter link description here
I just Refresh All Views
It works to me. Hope it helps you too.
This question seems to be getting some attention again so I'll give an update.
This issue existed in a Obj-C and Swift mixed project. So the Class in question was a Swift Class.
When making Swift classes available in Obj-C, you can use the following syntax
@objc(NTHamburgerButton) public class NTHamburgerButton : UIButton {}
Otherwise in your {Project-Name}-Swift.h file that Xcode Creates you will see that it generates these unique class names like that from the question.
The only real issue here was that the NTHamburgerButton.swift file was not being included in the Product I was looking at the at time, but if I switched targets, it worked fine. Thus the intermittent issue.
For me both solutions of Codermonk and specialvict was necessary, but not enough.
I also had to turn on Inherit From Target in Interface Builder:
This did the trick for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With