Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change class of UIButton to CheckboxButton in Interface Builder 9.3 #6

Closed
paulw11 opened this issue May 20, 2018 · 1 comment

Comments

@paulw11
Copy link

paulw11 commented May 20, 2018

The documentation states that you can change a UIButton to CheckboxButton in Interface Builder, but as of 9.3 this does not seem to be possible.

UIControl is a superclass of UIButton, but Interface Builder does not let you substitute a class that is not a subclass of the object you have placed. Changing CheckboxButton to subclass UIButton resolves this issue.

Otherwise, you must place a UIView in the storyboard scene and change its class to CheckboxButton

@chrisamanse
Copy link
Owner

You are right, to use in Interface Builder, the view component in the storyboard needs to be UIView, not a UIButton. Thanks for reporting the inaccuracy of the docs, I'll update it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants