Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added custom navigationBarClass support to NavigationController#1079

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@phlippieb
Copy link
Contributor

@phlippiebphlippieb commentedMay 25, 2018
edited
Loading

#1074

Adds an initializer to NavigationController that takes a custom navigation bar class parameter; this parameter is simply passed to super.

This extends NavigationController with the ability to be initialized with a user-defined subclass of NavigationBar.

@phlippieb
Copy link
ContributorAuthor

phlippieb commentedMay 25, 2018
edited
Loading

Two other ways I can think of doing this are:

  1. Make the new init a designated initializer, and make the old init (that always passesNavigationBar.self to super) a convenience init.
  2. Give the navigationbarClass parameter a default value ofNavigationBar.self

If you prefer either of those, I'll update my PR.

@OrkhanAlikhanov
Copy link
Contributor

Hey@phlippieb , thank you for your contribution. I would go with your first option. Which I guess what you meant should look like this, but with 2-spaced indention just like other parts of the file:

publicoverrideconvenienceinit(rootViewController:UIViewController){self.init(rootViewController: rootViewController, navigationBarClass:NavigationBar.self)}publicinit(rootViewController:UIViewController, navigationBarClass:AnyClass?){  super.init(navigationBarClass: navigationBarClass, toolbarClass:nil)setViewControllers([rootViewController], animated:false)}

If@DanielDahan approves either option, You may remove the commit rebase development branch again and reapply changes and do one clean commit. To be honest, I am not sure about the second option.

Copy link
Member

@daniel-jonathandaniel-jonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you!

@daniel-jonathandaniel-jonathan merged commit642bfef intoCosmicMind:developmentJun 2, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@daniel-jonathandaniel-jonathandaniel-jonathan approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@phlippieb@OrkhanAlikhanov@daniel-jonathan

[8]ページ先頭

©2009-2025 Movatter.jp