
Can I maintain Edit mode into the detailed views?
#1
Posted 31 January 2012 - 03:45 PM
For example: in the Core Data example app where there are Tasks and Task Steps is it possible that when you Edit an existing task that Edit mode is maintained when you go into a Task Step? At the moment the user has to tap on Edit again in each Task Step.
This is different from when you create a new Task where you can add Task Steps and edit them without having to tap Edit.
Also, in my particular App the detailed view has only one attribute which has a time picker. I would like, if possible, for the cell to be automatically chosen so the time picker automatically pops up. At the moment the user has to tap Edit, Tap the cell (which pops up the Time picker) and then Done and then back. It all seems a bit long-winded!
thanks,
Gary.
#2
Posted 15 March 2012 - 12:27 PM
#3
Posted 15 March 2012 - 05:31 PM
@Gary: Thank you very much for the suggestion, I'll make sure this gets added to our feature requests and implement it ASAP.
For the time being, you guys can optionally set the detail view's edit mode using the following SCTableViewModelDelegate method:
- (void)tableViewModel:(SCTableViewModel *)tableViewModel detailViewDidAppearForRowAtIndexPath:(NSIndexPath *)indexPath withDetailTableViewModel:(SCTableViewModel *)detailTableViewModel { [detailTableViewModel setModeledTableViewEditing:TRUE animated:TRUE]; }Also, using the same above method, you can have your date cell receive focus by calling [myDateCell becomeFirstResponder].
Hope this helps.
#4
Posted 20 March 2012 - 12:26 PM
- (void)tableViewModel:(SCTableViewModel *)tableViewModel detailViewDidAppearForRowAtIndexPath:(NSIndexPath *)indexPath withDetailTableViewModel:(SCTableViewModel *)detailTableViewModel { if (detailTableViewModel.tag == 2) //Task Step detailed View { if (tableViewModel.modeledTableView.editing) { [detailTableViewModel setModeledTableViewEditing:TRUE animated:TRUE]; // Select the first cell. For Date/Time cells causes picker to be displayed [[detailTableViewModel cellAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] becomeFirstResponder]; } } }
#5
Posted 20 March 2012 - 04:46 PM
Could you please list the methods that you are invoking..
David
#6
Posted 21 March 2012 - 09:57 AM
I suspect you are missing a
tableModel.autoAssignDelegateForDetailModels = YES;
?
Gary
#7
Posted 21 March 2012 - 10:20 AM
David
#8
Posted 21 March 2012 - 10:34 AM
Gary.
#9
Posted 21 March 2012 - 10:49 AM
If you have other ideas Gary, I'd welcome them, but thanks a lot for your responses.
David
#10
Posted 21 March 2012 - 02:06 PM
I suspect you're using a detail model and returning it via 'customDetailModelForRowAtIndexPath:'? If that's the case, then you should set autoAssign... for the custom model itself.
It's amazing how things got so much easier now with the new 'Actions' feature in STV 3.0. In fact, in our tests we're rarely using delegates any more!I'm hoping that Tarek's magic will allow more fine tuned access to specific views and rows in STV3.
#11
Posted 21 March 2012 - 02:36 PM
Anyway, I plopped detailModel.autoAssignDelegateForDetailModels = YES; into the customDetailTableViewModelForRowAtIndexPath
method, Is that what you meant? I still cannot intercept to style the subviews and the main detail view does not reflect down...
If you say it will be easier in stv3, I will wait.
One other question though - a bit different. Split View Controller - in the root view, how do I allow users to move rows...?
THANKS
#12
Posted 21 March 2012 - 08:27 PM

If that's Core Data bound, just set the 'orderAttributeName' in the entity definition to a valid integer attribute in your entity. This will enable Core Data re-ordering. Of course you'll also need to put the table view in edit mode (easiest way: add an Edit button to the navigation bar and assign it to the tableModel's editButtonItem, as per our Core Data App example).One other question though - a bit different. Split View Controller - in the root view, how do I allow users to move rows...?
Hope this helps.
#13
Posted 21 March 2012 - 09:16 PM
David
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users