-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Initialization refactoring & improvements #38
Conversation
…recognizers setup in viewDidLoad
Thanks for submitting the pull request. I'm curious to hear more about your last point. We're you running into real performance issues, or is this just more of a best practice? I haven't noticed any issues on my end with that. |
How is this different from calling
|
Well, there is actually no performance problems, you're right :) |
@larsacus |
I'm just posing this question. We probably need |
I'm guessing that since |
@larsacus Also, if we're instantiating controller from XIB - we also in trouble because of unconfiguret properties That was the case :) |
Docs from Apple on a designated initializer:
I think we may actually need to be calling super initWithNibName:bundle:... |
@kcharwood |
We're still investigating storyboard support in #33, but this looks like a needed change regardless. Yet another reason to stay away from |
I merged this in with 90582bf, and will get you credit in the changelog in the 0.2.0. Thanks for the pull! |
Replace initializing code into initWithNibName:bundle:.
Before that if we're using [MMDrawerController new]; - no setup occured and different options stay uninitialized.
Also i move [self.view setBackgroundColor:]; & gesture recognizers setup to viewDidLoad:
Calling self.view in init leads to view load & inefficient resources usage.