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

Not working with IBOutlets #1

Closed
crubiales opened this issue May 18, 2014 · 3 comments
Closed

Not working with IBOutlets #1

crubiales opened this issue May 18, 2014 · 3 comments

Comments

@crubiales
Copy link

Hello!

I love it, but I cannot use it by creating an UILabel with custom class RQShineLabel through an IBOutlet in my storyboard.

The only thing missing to work is to add the "awakeFromNib" function in the RQShineLabel implementation. I have added it and called [self commonInit] and it works perfectly, so if you wish, i think you can add that to be able to use it from storyboards or nibs :)

PS: I am someway new at developing with iOS, so my "solution" may not be the 'perfect one' (hell, it can be a total mess! :P) . I just know that an IBOutlet called from storyboards/nibs calls the "awakeFromNib" function, so I changed it in your code so I can use it 'not' programatically :)

Thanks for the code!!!

@zipme
Copy link
Owner

zipme commented May 18, 2014

Hi, Yes you are right you can add commonInit in either initWithCoder: or awakeFromNib in this case, I have released 0.1.1 to support this, have a look 😄

@zipme zipme closed this as completed May 18, 2014
@nilshott
Copy link

Thanks for the quick fix.

@nakp
Copy link

nakp commented Jun 3, 2014

Actually, if you are initiating the label with text from the storyboard, you need to set again the text for the label so it can animate, is this the expected behavior?

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

4 participants