NSViewController, . , , nib ( ivar ). nib. , , , .
. ( ) ; - ( , ).
- (void)_setAccessoryViewControllerFromTag:(NSInteger)tag;
{
if ( _accessoryContentViewController != nil )
{
[self setNextResponder:[_accessoryContentViewController nextResponder]];
[_accessoryContentViewController release];
}
switch ( tag )
{
case 0:
_accessoryContentViewController = [[RLGraphsViewController alloc] initWithNibName:@"GraphsView" bundle:nil];
break;
case 1:
_accessoryContentViewController = [[RLSummaryViewController alloc] initWithNibName:@"SummaryView" bundle:nil];
break;
case 2:
_accessoryContentViewController = [[RLEquipmentViewController alloc] initWithNibName:@"EquipmentView" bundle:nil];
break;
default:
_accessoryContentViewController = [[RLLocationsViewController alloc] initWithNibName:@"LocationsView" bundle:nil];
break;
}
[_accessoryContentViewController setNextResponder:[self nextResponder]];
[self setNextResponder:_accessoryContentViewController];
[self.accessoryView setContentView:[_accessoryContentViewController view]];
}