Welcome, Guest
Username Password: Remember me

detailViewModalPresentationStyle for an SCObjectSection
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: detailViewModalPresentationStyle for an SCObjectSection

detailViewModalPresentationSty​le for an SCObjectSection 1 year, 6 months ago #1

Dearest SensibleCocoians,

One of my SCTableViewModels has two sections, an SCObjectSection and a SCTableViewSection with an SCSelectionCell. I've set the cell's detailViewPresentationStyle to UIModalPresentationCurrentContext.

Now I've added a property definition to the SCObjectSection with the type set to SCPropertyTypeSelection.

I'd like the selection modal for that new property to also appear in the current context but I can't find a way to do so, is there one?

Otherwise I think I'll have to add another cell to the SCTableViewSection and transfer the state between the core data model and the cell status manually. Is that correct?
  • oldbeamer
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 0

Re: detailViewModalPresentationSty​le for an SCObjectSection 1 year, 6 months ago #2

Hi Emiliano,

All you need to do is set the cell's detailViewModalPresentationStyle property in the SCTableViewModelDelegate method called tableViewModel:willConfigureCell:forRowAtIndexPath:

 
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
willConfigureCell:(SCTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.detailViewModalPresentationStyle = UIModalPresentationCurrentContext;
}
 


The above will set the property of all your model cells, so no need to set this again elsewhere. Please tell me if this works well for you.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
Last Edit: 1 year, 6 months ago by tarekskr.

Re: detailViewModalPresentationSty​le for an SCObjectSection 1 year, 6 months ago #3

Perfect Tarek! thank you!

It exhibits the problem I mentioned in that other thread but you already know about it.
  • oldbeamer
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 0
  • Page:
  • 1
Time to create page: 1.79 seconds