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 UITabBarController.configureViewControllers #7

Merged
merged 6 commits into from Aug 30, 2016

Conversation

sharplet
Copy link
Contributor

Fixes #6.

Simplifies passing dependencies to tabs within a tab bar controller by searching within each tab's view controller hierarchy for a matching view controller to configure.

Simplifies passing dependencies to tabs within a tab bar controller by
searching within each tab's view controller hierarchy for a matching
view controller to configure.
This name more clearly suggests that we are configuring the tab bar
controller's `viewControllers` array.
@sharplet sharplet changed the title Add UITabBarController.configureTabs Add UITabBarController.configureViewControllers Aug 30, 2016
@jakecraige
Copy link

👍

import UIKit

extension UIViewController {
public func childViewController<Child: UIViewController>(ofType type: Child.Type) -> Child? {

Choose a reason for hiding this comment

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

Since this is public, it might be nice to add a doc comment as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call

@sharplet sharplet merged commit 6045b92 into master Aug 30, 2016
@sharplet sharplet deleted the as-configure-tabs branch August 30, 2016 20:32
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.

None yet

2 participants