Hi Vladimir,
STV allows you to fully customize all automatically generated detail views, no matter how deep their level is. For your delegate methods to get called for detail views, you should set their "delegate" property to your view controller in the detailViewWillAppearForRowAtIndexPath method. Starting STV 2.0 (final version not released yet), you should use the detailModelCreatedForRowAtIndexPath to do that instead. Here is a code sample:
// ******* PRE-STV2.0 ********
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
detailViewWillAppearForRowAtIndexPath:(NSIndexPath *)indexPath
withDetailTableViewModel:(SCTableViewModel *)detailTableViewModel
{
detailTableViewModel.delegate = self;
// Set the tag property of the detail model to correspond to its level in the hierarchy
detailTableViewModel.tag = tableViewModel.tag + 1;
}
// ******* STV2.0 AND LATER ********
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
detailModelCreatedForRowAtIndexPath:(NSIndexPath *)indexPath
detailTableViewModel:(SCTableViewModel *)detailTableViewModel
{
detailTableViewModel.delegate = self;
// Set the tag property of the detail model to correspond to its level in the hierarchy
detailTableViewModel.tag = tableViewModel.tag + 1;
}
Now all you need to do in the rest of the delegate methods is to identify the detail model's level using its tag, then do whatever action that's appropriate for that model. For example:
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
willDisplayCell:(SCTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
switch(tableViewModel.tag)
{
case 0: // Main model
// do main level customizations here
break;
case 1: // Level 1 detail model
// do level 1 customizations here
break;
case 2: // Level 2 detail model
// do level 2 customizations here
break;
}
}
Hope this helps!