UA-17470720-3

Jump to content


Photo
- - - - -

How do I select a task that slides a new viewcontroller onto screen with a list of subtasks


  • Please log in to reply
4 replies to this topic

#1 alphaai

alphaai

    Sr. Member

  • STV 3.0 Pro
  • PipPipPip
  • 41 posts
Reputation: 11
Good

Posted 23 May 2013 - 07:23 PM

Hello,

 

I would like to have one cell at the top with a section header called "Last time" and show the one task that has the oldest completed date. Then when I click on the tasks accessory icon, it takes me to a new view controlller with a list of all my tasks listed in beginning with oldest completed task first.

 

Anyone know how I might do that using a UIViewController and Core Data?

Thanks,

 

Ben



#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 24 May 2013 - 12:34 PM

Hi Ben,

 

I am not sure I fully understand this... Are you having an SCArrayOfObjectsSection and you'd like to insert an extra cell at the top?



#3 alphaai

alphaai

    Sr. Member

  • STV 3.0 Pro
  • PipPipPip
  • 41 posts
Reputation: 11
Good

Posted 26 May 2013 - 05:42 PM

Hi Tarek,

 

There is a list of 10 tasks. I only want to show 1 on the main screen under a heading. If you were to click on the accessory button for the item, it will load another view controller with a list of the 10 tasks presented.

At the moment, when I click on an item, it shows the detail view.

Any idea how I would achieve this? Thanks, Ben



#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 29 May 2013 - 10:33 AM

Hi Ben,

 

It seems that SCArrayOfObjectsCell is a perfect fit for your case:

 

SCTableViewSection *section = [SCTableViewSection section];
SCArrayOfObjectsCell *tasksCell = [SCArrayOfObjectsCell cellWithItems:myTasksArray itemsDefinition:taskDef];
tasksCell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
[section addCell:tasksCell];
[self.tableViewModel addSection:section];


#5 alphaai

alphaai

    Sr. Member

  • STV 3.0 Pro
  • PipPipPip
  • 41 posts
Reputation: 11
Good

Posted 04 June 2013 - 11:43 PM

Great,

 

For some reason UITableViewCellAccesoryDetailDisclosureButton doesnt show up. Instead the UITableViewCellAccessoryDisclosureIndicator shows instead. Any ideas?

 

I can see that once I have the DetailDisclosureButton visible, I can click on it and handle the event with:

    self.tableViewModel.cellActions.accessoryButtonTapped = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
    {
        NSLog(@"Cell at indexPath:%@ accessory button has been tapped.", indexPath);
    };

then the question becomes, how do I show the Array Of Objects?

 

Got some other questions:

 

1) Do you have any gestureRecognizers support in sensible tableview? would like to add a new cell to a section by holding down on the cell, that way I can preselect one of the SCObjectsCell SCPropertyDefinition to the name of the header above the held cell..If u do not support gestureRecognizer, could u tell me how I would add that additional behaviour to a cell or cells.

 

2) My posts are scattered all around sensibletableview and that wouldn't help you at all when trying to connect where I am trying to head with my app. I think I might make a new post in regards to my project and continue to ask all kinds of questions in that post. Maybe I could add tags to the post as well. What you reckon?

 

Thanks,

 

Ben


Edited by alphaai, 04 June 2013 - 11:44 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users