Commits

Anonymous committed 3c1e8d4

When tabview controller is appearing/disappearing, so too is its selected view controller, so pass those messages on

Comments (0)

Files changed (1)

BWTabViewController.m

     if ([tabViewItem view] != view) [tabViewItem setView:view];
 }
 
+#pragma mark Presentation
+
+/*  Pass on messages to selected view controller since presentation will affect it too
+ */
+
+- (void)viewWillAppear:(BOOL)animated;
+{
+    [super viewWillAppear:animated];
+    [[self selectedViewController] viewWillAppear:animated];
+}
+
+- (void)viewDidAppear:(BOOL)animated;
+{
+    [super viewDidAppear:animated];
+    [[self selectedViewController] viewDidAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated;
+{
+    [super viewWillDisappear:animated];
+    [[self selectedViewController] viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated;
+{
+    [super viewDidDisappear:animated];
+    [[self selectedViewController] viewDidDisappear:animated];
+}
+
 #pragma mark Layout
 
 - (NSSize)viewSizeForContentSize:(NSSize)contentSize;