[MonoTouch] What are the advantages of UIViewController containment of iOS5 SDK?
René Ruppert
rene.ruppert at googlemail.com
Fri Oct 28 02:26:47 EDT 2011
Alright, so those eggshells could be what I am currently experiencing then
with my random crashes. Sigh. I just cannot switch to ios 5 yet, that's the
drama.
And is the containment stuff really new or has it just been opened to the
public?
Grüße, René
Am 28.10.2011 um 05:09 schrieb Miguel de Icaza <miguel at xamarin.com>:
> But why would Apple then open up the API for view controller containmant
> (Episode 102 of WWDC 2011)? If I rewrite MTSplitViewController to work on
> iOS5 only by using this new technique, what would be the advantages?
>
The original model was always a bit promiscuous.
The way that a view controller would be made active was not by stating "This
is the view controller that is active", but instead by extracting the
toplevel view of the view controller and adding it to the hierarchy of
another view (Window typically).
This was always a little bit gross. But not only it was gross, it also
happened that if you did this incorrectly, or swapped elements, or in
general did anything that UIKit was not prepared for, you would have random
crashes in some cases, and a very frustrating debugging experience.
The new APIs introduce the actual rules for implementing a view controller
hand-off, and in particular, it covers things like "THis view controller is
no longer active", which has always been a source of questions and unsolved
problems (Like 'When is it safe to unload my cached images?').
Or asked differently: what issues can one expect with the current
> implementation? As far as I can see, everybody is happy with Matt's
> MGSplitViewController.
>
They are, they are just walking on eggshells, so if something goes wrong
with complex hierarchies, it is hard to figure out why.
The new model solves this.
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111028/aea8f765/attachment.html
More information about the MonoTouch
mailing list