Commits

Anonymous committed c601f81

BWTabViewController.selectedViewController is assigned rather than retained, just like UIKit

  • Participants
  • Parent commits bdafd86

Comments (0)

Files changed (2)

File BWTabViewController.h

 #pragma mark Managing the Selected Tab
 
 //  Both are KVO-compliant
-@property(nonatomic, retain) NSViewController *selectedViewController;
+@property(nonatomic, assign) NSViewController *selectedViewController;
 @property(nonatomic) NSUInteger selectedIndex;
 
 //  For subclasses to know when selection is changing without needing KVO. Default implementation does nothing.

File BWTabViewController.m

     [self setTabView:nil];  // releases view and tears down binding/delegation
     
     [_identifier release];
-    [_selectedViewController release];
     [_tabViewItems release];
     [_viewControllers release];
     
         [controller viewWillAppear:NO];
     }
     
-    [_selectedViewController release], _selectedViewController = [controller retain];
+    _selectedViewController = controller;
     
     [self didSelectViewController];
     if (viewLoaded)