[MonoTouch] Startup times: nib vs. nib-less [was Re: Can I show splash image within a second?]

Ed Anuff ed at anuff.com
Sat Nov 28 02:06:45 EST 2009


Actually, the problem with the tab bar controller occurs when you don't have
your (populated) tab bar controller in your main nib.  For example, if you
had a splash screen/login screen that you were trying to get up as quickly
as possible and then loaded the tab bar controller separately.  In my app,
that's what I'm trying to make happen as quickly as possible.

However, your second point in interesting, if you're doing stuff in loadView
(or viewDidLoad) then I think your code is still being executed during nib
load time.  That's why I was suggesting if you want to really get the
maximum benefit of not using a monolithic nib, you'd look at overriding
viewWillAppear, which should be getting called when you actually cause a
specific tab view to be displayed, so you could defer constructing the UI
for that tab till that point.   As I said before, the idea isn't that you're
going to get your speed improvement just by doing the same thing in your
code that  initWithNibName:bundle: does, it's going to come from breaking up
the work so that it doesn't happen all at once when you load the main nib.

On Fri, Nov 27, 2009 at 5:55 PM, Rory Blyth <lists at rory.me> wrote:

> Regarding the use of tab bar controllers as main controllers and associated
> issues... I've never experienced that. The only problem I ever had was the
> one following a new release of Apple's dev tools - they fiddled with
> something, and my stuff broke. It was working for months before that. And it
> was far more convenient than doing it by hand (even though doing it by hand
> is trivial).
>
> I'm not even sure how I'd use a tab bar controller *without* it being my
> main controller. It might be habit, but... I don't see how else you'd do it
> if you're writing a tab bar based app.
>
> When it comes to coding by hand, I override loadView (or "LoadView" in MT)
> and just do it to it. There are many reasons for doing this - the most
> important, for me, have been:
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20091127/8f009691/attachment.html 


More information about the MonoTouch mailing list