1. mikeabdullah
  2. BWToolkit

Commits

Mike Abdullah  committed ccb5a51

-[BWTabViewController close] method

  • Participants
  • Parent commits 9e6061c
  • Branches default

Comments (0)

Files changed (2)

File BWTabViewController.h

View file
  • Ignore whitespace
     NSViewController    *_selectedViewController;
 }
 
+
+#pragma mark Lifecycle
+
 // If you're not loading from a nib, this is handy to specify the most basic tabview property
 - (id)initWithTabViewType:(NSTabViewType)type;  // designated initializer
 - (id)init; // the default top tabs look
 
+- (void)close;  // sends -close message to any .viewControllers that respond to it
+
 
 #pragma mark View Properties
 

File BWTabViewController.m

View file
  • Ignore whitespace
     return [self initWithTabViewType:NSTopTabsBezelBorder];
 }
 
+- (void)close;  // sends -close message to any .viewControllers that respond to it
+{
+    for (NSViewController *aController in [self viewControllers])
+    {
+        if ([aController respondsToSelector:_cmd]) [aController performSelector:_cmd];
+    }
+}
+
 - (void)dealloc
 {
     // Detach controllers first