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

Use initWithCoder: instead of awakeFromNib #7

Merged
merged 1 commit into from
Mar 20, 2013
Merged

Use initWithCoder: instead of awakeFromNib #7

merged 1 commit into from
Mar 20, 2013

Conversation

mbinna
Copy link
Contributor

@mbinna mbinna commented Feb 8, 2013

When configuring an SMPageControl from inside a Storyboard or XIB file, the developer might want to use User Defined Runtime Attributes to configure the instance. awakeFromNib is called after those attributes are evaluated by the nib loading system, effectively overwriting the attributes defined in the Storyboard or XIB file. Therefore, initWithCoder: is the more appropriate location to perform the initialization.

Screen Shot 2013-02-08 at 10 55 23

When configuring an SMPageControl from inside a Storyboard or XIB file, the developer might want to use User Defined Runtime Attributes to configure the instance. awakeFromNib is called after those attributes are evaluated by the loading system, effectively overwriting the attributes defined in the Storyboard or XIB file. Therefore, initWithCoder: is the more appropriate location to perform the initialization.
@jerryhjones
Copy link
Member

This is a solid change. I was vehemently anti-nib until fairly recently, so I'm not always aware of the nuances. Thanks for the pull requests.

jerryhjones added a commit that referenced this pull request Mar 20, 2013
…romNib

Use initWithCoder: instead of awakeFromNib
@jerryhjones jerryhjones merged commit 608b73e into Spaceman-Labs:master Mar 20, 2013
@mbinna
Copy link
Contributor Author

mbinna commented Mar 21, 2013

You're welcome. Thanks for pulling my changes.

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