Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2009, 07:04 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 3
Default Slash/Loading view

I'm new to iphone programming and have a simple question (I think).

I've created an app using a tabbar with 4 views. In the appdelegate I initialize the model objects and in the viewcontrollers I determine if they need to be refreshed. This way the views come up quicker. (Is this the right way? I found that having the viewcontroller load up the model objects would cause a large delay in the showing of the view?) So, even after having the models initialize in the appdelegate there is a delay in the first viewcontroller showing. So I guess I need a loading view/screen.

So the question is: how do I get the loading screen to come up without delay?

I've tried putting code into the applicationDidFinishLaunching as he first thing - figuring after everything got loaded it would hit the "[window addSubview:tabBarController.view];". Still had the delay - and never saw the splash screen come up.

Next I tried putting in the awakefromnib on the first viewcontroller - while it did seem to hit the viewdidload of the splash screen, nothing again came up.

So where do you put it?

Thanks!
orrengg is offline   Reply With Quote
Old 11-20-2009, 11:55 PM   #2 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 6
Default

Quote:
Originally Posted by orrengg View Post
I'm new to iphone programming and have a simple question (I think).

I've created an app using a tabbar with 4 views. In the appdelegate I initialize the model objects and in the viewcontrollers I determine if they need to be refreshed. This way the views come up quicker. (Is this the right way? I found that having the viewcontroller load up the model objects would cause a large delay in the showing of the view?) So, even after having the models initialize in the appdelegate there is a delay in the first viewcontroller showing. So I guess I need a loading view/screen.

So the question is: how do I get the loading screen to come up without delay?

I've tried putting code into the applicationDidFinishLaunching as he first thing - figuring after everything got loaded it would hit the "[window addSubview:tabBarController.view];". Still had the delay - and never saw the splash screen come up.

Next I tried putting in the awakefromnib on the first viewcontroller - while it did seem to hit the viewdidload of the splash screen, nothing again came up.

So where do you put it?

Thanks!
All you have to do id add an image named Default.png to your project (this will be the picture of the loading screen, prefferrably 320 x 480). Then add (1); to your appdelegate.m in the applicationDidFinishLaunching function:


- (void)applicationDidFinishLaunchingUIApplication *)application {

(1); ///This tells XCode that you have a loading screen


// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
}
iminichrispy is offline   Reply With Quote
Old 11-30-2009, 05:21 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 3
Default

Quote:
Originally Posted by iminichrispy View Post
All you have to do id add an image named Default.png to your project (this will be the picture of the loading screen, prefferrably 320 x 480). Then add (1); to your appdelegate.m in the applicationDidFinishLaunching function:


- (void)applicationDidFinishLaunchingUIApplication *)application {

(1); ///This tells XCode that you have a loading screen


// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
}
Thanks! That worked perfectly!
orrengg is offline   Reply With Quote
Reply

Bookmarks

Tags
loadingscreen, navigation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 248
21 members and 227 guests
ADY, Alsahir, beleg_1998, Dani77, diyora, FAED, fredidf, iDifferent, iph_s, JamesCahall, JasonR, mer10, prchn4christ, Rudy, smithdale87, Speed, spiderguy84, stekki, tgjorgoski, timle8n1, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,755
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0