UA-17470720-3

Jump to content


Photo
- - - - -

Split-view - create new item in detailView rather than popover


  • Please log in to reply
3 replies to this topic

#1 channel200

channel200

    Starting Out

  • STV Lite
  • Pip
  • 4 posts
Reputation: 0
Neutral

Posted 27 January 2015 - 10:36 AM

I have a split-view controller configured as per the STV 3 docs example for the iPad.

 

rootViewController.tableViewModel.detailViewController = detailViewController;

 

When new items are created, they appear in a popover view - it isn't until they are saved and dismissed that they can be displayed in the detail view.

 

Is it possible to display newly created items in the detail view without swizzling the framework? 



#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 29 January 2015 - 10:39 AM

Hi channel200,

 

If I correctly understand you, what you're describing should be the default STV behavior. Is the bundled iPad sample not behaving this way?



#3 channel200

channel200

    Starting Out

  • STV Lite
  • Pip
  • 4 posts
Reputation: 0
Neutral

Posted 06 February 2015 - 10:28 AM

We're currently building an evaluation app and as such using the 3.4 Lite version of the framework, but I don't see an included sample app that uses a split view controller. I've followed the tutorial in the included PDF documentation and the result is, yes, a new root model item is presented in a popover. The behaviour appears to be that a new root model instance is not created in this example until the 'Done' button is pressed. If 'Cancel' is pressed, nothing is created. This seems to explain why a new instance isn't presented in the split view controller's detail view - that would require immediate creation of a new model instance (note that I'm referring to the data model here, not the tableview model).

 

We can certainly create a new root model instance manually and present it in the detail view if necessary - I'm wondering if this is necessary. I'm still working up a structure for a non-trivial app.

 

Most of the samples seem predicated on presenting modal edits usiing 'Done'/'Cancel' (which occurs by default based on the type of navigation bar menu selected?) .

This is, to my mind, unnecessary except in edge cases - the 'Done'/'Cancel' requires extra taps that quickly become a chore for the user.

 

I don't see anything that prevents creation of a completely non-modal flow, but am wondering if I'm either missing something, or the default behaviour has changed in version 4?



#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 11 February 2015 - 09:09 AM

Thank you very much for the thorough explanation, I now understand what you mean. 

 

The simple solution for this is for us to implement a new way where items can be manually added to SCArrayOfObjectsSection. This way you'll manually add your items without prompting the user with the modal view, and they'll be immediately available for them to edit in the split view controller. We however can only add new features to STV 4.0.

 

Thanks again and I apologize for misunderstanding the question earlier.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users