[MonoTouch] What are the advantages of UIViewController containment of iOS5 SDK?
Miguel de Icaza
miguel at xamarin.com
Mon Oct 31 08:30:51 EDT 2011
Hey,
ViewController containment is a new feature in iOS5, it did not exist
previously.
They fixed their own series of hacks with this feature.
Miguel
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/20111031/48e01299/attachment-0001.html
More information about the MonoTouch
mailing list