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
Implement storyboard (or xib) use #35
Comments
+1 |
@klauslanza @cauli Thank you for dropping by and sorry for the late response. HTPressableButton also works with storyboard. We will update the project very soon with storyboard example along with detailed screenshot tutorials on README about how to add HTPressableButton to your storyboard. |
That's great, I'll try it as soon as I can on my projects! |
I've tried it today and it works like a charm. Thanks! |
Just by changing UIButton class to HTPressableButton? It's not working for me. |
Hey @klauslanza, I just made a simple quick detailed tutorial for you: After you connect the button with the code, you should see this:
Now you can enjoy pressing on HTPressableButton! 😄 🍻 😃 |
@klauslanza Please let me know if that works for you 😄 |
Thanks for the tutorial, @tandavas. What I did was a little bit different. I Used User-Defined Runtime Attributes in the storyboard for more flexibility, setting 'buttonColor', 'shadowColor', and other properties I found in HTPressableButton.h until it felt right. I also slightly modified the plugin to better fit my needs, because I think it is not impossible to set some things (like the button style) directly via Runtime Attributes. I also modified the plugin to use Storyboard-defined UIEdgeInsets, that allowed me to put images inside the button. I also modified it to set the backgroundColor of the button to clearColor, that allowed me to create colored buttons on the storyboard just for organization (it could also be possible to set this color directly to the HTPressableButton) I will upload these changes to my fork of the project later today. |
That's great! Best issue followup ever :-) I was trying just by changing the class because I've seen components doing this and using "User Defined Runtime Attributes" dialog for setting the properties of the button. This solution have the advantage (or disadvantage :-) of being IB only, no code required. Do you think it is implementable? I will give a thought on the weekend in case. EDIT: |
Thank you!
Yes, we definitely can implement that! @herinkc and I thought about this earlier but we couldn't find time to implement it 😢 |
It would be useful to be able to set the buttons directly in storyboards, just by changing the class of the normal unbutton object. Any plan on implementing it?
The text was updated successfully, but these errors were encountered: