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

Add initWithCoder: method for NIB support #1

Merged
merged 2 commits into from
Jul 2, 2012
Merged

Add initWithCoder: method for NIB support #1

merged 2 commits into from
Jul 2, 2012

Conversation

ole
Copy link
Contributor

@ole ole commented Jun 29, 2012

DYRateView doesn't initialize correctly when it is loaded from a NIB file because the custom properties that are set in initWithFrame:fullStar:emptyStar: do not get initialized to their default values. I corrected that by adding an initWithCoder: method. Some code duplication could be removed by extracting the common initialization to a separate method. Let me know if you like this approach and I could add it, too.

@dyang
Copy link
Owner

dyang commented Jun 29, 2012

Hi Ole,

Thank you for using DYRateView and providing the patch! I really appreciate that!

I rarely use NIBs and interface builder myself, that's probably why I haven't even tried it that way.

I'm a bit busy at this point. I'm hoping to find sometime to process your patch in the weekend.

Best regards,

Derek

Derek Yang
http://www.iappexperience.com

On Jun 29, 2012, at 4:10 PM, Ole Begemann wrote:

DYRateView doesn't initialize correctly when it is loaded from a NIB file because the custom properties that are set in initWithFrame:fullStar:emptyStar: do not get initialized to their default values. I corrected that by adding an initWithCoder: method. Some code duplication could be removed by extracting the common initialization to a separate method. Let me know if you like this approach and I could add it, too.

You can merge this Pull Request by running:

git pull https://github.com/ole/DYRateView master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • Add constants for default full and empty images
  • Add default initialization in initWithCoder: for NIB support

-- File Changes --

M DYRateView/DYRateView/DYRateView.m (18)

-- Patch Links --

https://github.com/dyang/DYRateView/pull/1.patch
https://github.com/dyang/DYRateView/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

dyang added a commit that referenced this pull request Jul 2, 2012
Add initWithCoder: method for NIB support
@dyang dyang merged commit 39bcd52 into dyang:master Jul 2, 2012
@dyang
Copy link
Owner

dyang commented Jul 2, 2012

Some code duplication could be removed by extracting the common initialization to a separate method. Let me know if you like this approach and I could add it, too.

I'd very much appreciate it if you go ahead and refactor it. Thanks Ole!

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

Successfully merging this pull request may close these issues.

2 participants