UA-17470720-3

Jump to content


Photo
- - - - -

Prevent DetailViewController from loading

view-controllers sections

  • Please log in to reply
2 replies to this topic

#1 TODD GARLAND

TODD GARLAND

    Experienced Member

  • STV 4.0 Pro
  • PipPipPipPip
  • 69 posts
Reputation: 21
Excellent

Posted 31 December 2014 - 03:41 PM

Gents,

 

Happy New Year to all before i start.

 

I have question:

 

I have popover with master controller and sc array of objects. 

 

What I want to be able to do is this, when I click on row, I do not want the detail view controller to launch. Already removed cell accessory. I want detail view controller to only  launch using an "Edit" button on navigation controller.

 

Is this possible.

 

Thanks

 

Todd



#2 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 31 December 2014 - 04:08 PM

you need to control the didSelect for the cell

 

    section.cellActions.didSelect = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
    {
        NSLog(@"Cell at indexPath:%@ has been selected.", indexPath);
        //Here you can do what you like

        //but if we are in edit mode - edit the item
        if (cell.isEditing) {
            SCArrayOfObjectsSection *section = (SCArrayOfObjectsSection*)cell.ownerSection;
            
            [section dispatchEventSelectRowAtIndexPath:indexPath];
        }
    };

 

is that what you mean? else you get the idea on what method to use when tapping something


  • Tarek likes this

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#3 TODD GARLAND

TODD GARLAND

    Experienced Member

  • STV 4.0 Pro
  • PipPipPipPip
  • 69 posts
Reputation: 21
Excellent

Posted 04 January 2015 - 08:20 AM

Ozie,

 

Thanks for the reply. Worked it all out.

 

Todd







Also tagged with one or more of these keywords: view-controllers, sections

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users