Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #29 from danielvy/selectControllerWithIdentifier
Browse files Browse the repository at this point in the history
Added convenience method selectControllerWithIdentifier
  • Loading branch information
Vadim Shpakovski committed Oct 5, 2014
2 parents d6f0307 + 3f6a16f commit 68f525d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions MASPreferencesWindowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ __attribute__((__visibility__("default")))
- (void)addViewController:(NSViewController <MASPreferencesViewController> *) viewController;

- (void)selectControllerAtIndex:(NSUInteger)controllerIndex;
- (void)selectControllerWithIdentifier:(NSString *)identifier;

- (IBAction)goNextTab:(id)sender;
- (IBAction)goPreviousTab:(id)sender;
Expand Down
5 changes: 5 additions & 0 deletions MASPreferencesWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ - (void)selectControllerAtIndex:(NSUInteger)controllerIndex
self.selectedViewController = [self.viewControllers objectAtIndex:controllerIndex];
}

- (void)selectControllerWithIdentifier:(NSString *)identifier
{
self.selectedViewController = [self viewControllerForIdentifier:identifier];
}

#pragma mark -
#pragma mark Actions

Expand Down

0 comments on commit 68f525d

Please sign in to comment.