UA-17470720-3

Jump to content


Photo
- - - - -

popToRoot


  • Please log in to reply
8 replies to this topic

#1 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 04 April 2011 - 03:59 AM

Hi,

Using the iPad app as an example, if I have added multiple Tasks (and the iPad is in Landscape mode) and then for one task I have navigated into the hierarchy (i.e. by clicking on "Task Steps" ). If that detail view is visible, when I click on one of the other Tasks nothing happens. I have tried implementing didSelectRow but nothing was triggered. Any ideas on how to get around this ??

In a similar situation, I want to be able to pop back to the root view (i.e. the initial view in the DetailViewController) from that nested position. I have tried the popToRootViewController but that seems to just crash! Any ideas on how to get around this ??

At the moment I'm still using v1.6.9.

Thanks,
Phil.

#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 04 April 2011 - 04:29 PM

Hi Phil,

Using the iPad app as an example, if I have added multiple Tasks (and the iPad is in Landscape mode) and then for one task I have navigated into the hierarchy (i.e. by clicking on "Task Steps" ). If that detail view is visible, when I click on one of the other Tasks nothing happens. I have tried implementing didSelectRow but nothing was triggered. Any ideas on how to get around this ??


Yes, that's the default behavior. In a master-VC/detail-VC relationship, STV locks in your master-VC selection until you tell it what to do with the sub-detail modifications (either cancel or commit). Are you thinking of adding an option to STV that would auto-commit all changes instead of locking in the user's selection?

n a similar situation, I want to be able to pop back to the root view (i.e. the initial view in the DetailViewController) from that nested position. I have tried the popToRootViewController but that seems to just crash! Any ideas on how to get around this ??


This relates to the issue above. If we add an auto-commit option, you'll be able to safely popToRootViewController.

#3 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 04 April 2011 - 08:38 PM

Hi Tarek,

That does sound like a good option, although I'm more concerned with the existing [tableModel.viewController.navigationController popToRootViewControllerAnimated:TRUE] crashing though (well it crashes but no stack trace produced). Is that part of the STV locking you mention ?

On a related issue with that Master-VC/Detail-VC relationship, if I have made a selection on the Master (LHS) it is selected. Once I start navigation in the Detail-VC, it remain selected, which is good. However once I start to dismiss the detail-vc and reach the root VC for the Detail, the Master does not stay selected. I have set the
self.clearsSelectionOnViewWillAppear = NO
in my rootViewController but still deselects on that last dismiss. Have you seen this before.

Many thanks,
Phil.

#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 04 April 2011 - 08:55 PM

Hi Phil,

That does sound like a good option, although I'm more concerned with the existing [tableModel.viewController.navigationController popToRootViewControllerAnimated:TRUE] crashing though (well it crashes but no stack trace produced). Is that part of the STV locking you mention ?


It's not that it's part of the locking, it's just that STV doesn't expect the VC to be popped on it's behalf in that way. STV expects itself to be popping all the detail views in the hierarchy, one at a time. Popping to root needs to be added to the architectural design of STV in order to work.

However once I start to dismiss the detail-vc and reach the root VC for the Detail, the Master does not stay selected.


We'll try to replicate and fix that. There is a minor update that should be out by tomorrow, we'll do our best to have this fix included. Thanks a lot Phil!

#5 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 17 April 2011 - 11:06 PM

Hi Tarek,

Is there any update on the pop to root functionality ??

My app uses alot of images in the STV framework, and at the moment its raising a didReceiveMemoryWarning so I'm not sure if the images in STV are all being cached ?? Would that be possible ??

Once it receives the didReceiveMemoryWarning I plan to poptoroot so that the STV model doesnt become inconsistent.

Do you know of any other tools to help with tracking where too much memory might being used. I've used "Leaks" for memory leaks and I don't have any any, but did notice one in SCTableViewSection (after doing a Build/Analyse) but it might just be a false positive. (I've attached the screenshots)

Thanks,
Phil.



[attachment=96]Screenshot2011-04-18at9.36.26AM.png[/attachment]

[attachment=97]Screenshot2011-04-18at9.36.38AM.png[/attachment]

#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 18 April 2011 - 10:32 PM

Hi Phil,

The pop-to-root feature has been planned for the STV 2.1 release, due in roughly a month. How urgent do you need this?

Do you know of any other tools to help with tracking where too much memory might being used. I've used "Leaks" for memory leaks and I don't have any any


You actually need to use Intruments' "Allocation", which gives you an awesome overview of how your project allocates memory.

but did notice one in SCTableViewSection (after doing a Build/Analyse) but it might just be a false positive. (I've attached the screenshots)


Regarding the analyzer warnings, this is nothing to worry about. The analyzer is being confused by our use of compiler pre-processors (e.g.: "#ifdef _COREDATADEFINES_H").

#7 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 18 April 2011 - 11:27 PM

Hi Tarek,

Thanks for that info.

The poptoRoot functionality is kinda urgent if I could get access to it sooner ? Or even if you have some code which could slot in. I'm not sure just how big a job it is.

Phil.

#8 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 18 April 2011 - 11:30 PM

Thanks Phil, I'll check and get back to you on that.

#9 Piet Groot Kormelink

Piet Groot Kormelink

    Starting Out

  • STV 5.0 Pro
  • Pip
  • 1 posts
Reputation: 0
Neutral

Posted 26 June 2013 - 12:40 AM

Hello Tarek,

 

is popToRoot possible in STV 3.2?

 

i tried several things but found no solution that works.

 

Thanks in advance for your info.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users