Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 15    Views: 68

Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
06/01/14 06:17 PM (10 years ago)

How to avoid the beginning blank screen when app launch?

Why there is a 2-3 second blank screen when the app launch, it used not like this when I use the V2.9 , is this the problem of V3.0? The blank screen can be seen from the following pic: https://www.dropbox.com/s/gsgarl148tuqncg/2014-06-02%2009.08.23.png
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
06/01/14 09:33 PM (10 years ago)
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 12:08 AM (10 years ago)
Thanks for your solution. Another question appear in my mind... how many pics- "YourImageName.png" should I prepare: Cause there are different screen size of devices... --------------------------- CHANGE: --------------------------- [self.view setBackgroundColor:[UIColor whiteColor]]; --------------------------- TO THIS: --------------------------- [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"YourImageName.png"]]];
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 12:33 AM (10 years ago)
Why I didn't get the expected result although I have done the two code replace jobs said by Angry Ninja. My App change to launch black screen instead of white screen. No loading image shows... I have checked the code and the image I put in the BT-image folder, it all OK, as the following pis shows: https://www.dropbox.com/s/59x9uycvr86xk08/launchwhitescreen.jpg
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
06/02/14 12:37 AM (10 years ago)
Did you add the image to the xcode project? Once you add it to the bt_images folder! you still need to add it to the project. Size 320x 596 works well. You can only specify 1 file in the code edit that I posted
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 01:06 AM (10 years ago)
After adding the image to the project, It do works.... but there is another problem, as the dimension of the loading image.... when launch on iphone5, it should be 640*1136 ,right? but why it just shows the part of the image: https://www.dropbox.com/s/mxt9v8yjzsdey8t/loadimage.jpg
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
06/02/14 01:13 AM (10 years ago)
No, use the smaller size... Retina sizes don't work correctly for this. See the discussion about the size further down in the link I posted at the top of the page... https://www.buzztouch.com/forum/thread.php?tid=C02498F2E8BB74B6B98EBBB
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
06/02/14 02:56 AM (10 years ago)
In case anybody is interested, there is a pretty easy way to replace the standard white background with your own splash image. This was solved a few months ago in this thread - https://www.buzztouch.com/forum/thread.php?tid=E1F2DF6986BDA9BA84EDF41&sortColumn=FT.id&sortUpDown=DESC&currentPage=1 If you use this method, drag the following two files directly into your project - https://www.dropbox.com/sh/v881ry7kztblwjq/AAD2irawNxA-_YGNUrZP9Hb7a - with these two files in your project your app will immediately start recognizing the following image sizes - 3.5 Inch Screen Non-Retina --- 320 x 480 3.5 Inch Screen Retina --- 640 x 960 5 Inch Screen --- 640 x 1136 iPad --- 1024 x 1024 iPad Retina --- 2048 x 2048
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 05:24 AM (10 years ago)
hi, Absentia Thanks for your answers: ) I have two questions: 1. after adding the two files to the project, should I need to include the .h file in other files? 2. Should I prepare 5 different sizes of pics you mentioned above or just need to prepare one image and your two file can help me to resize the image to different size? ps: the ipad size shoule be 768*1024, not 1024*1024, right?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
06/02/14 06:12 AM (10 years ago)
1. You don't need to include the .h into other files. 2. Yes, you need to make images for all those sizes. 3. Not sure about the iPad screen size, perhaps he said it that way to allow for screen rotation? -- Niraj
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 07:08 AM (10 years ago)
hi,Niraj Nice to see you again: ) For the image things, one problem frustrated me recently. you know ,sometimes the size of app is very small, maybe 800K ,but if I prepare 5 different sizes of images as the launch image, usually there are PNG format, each account for 400K around, so the launch images can account for 2M , which is more bigger then the app itself... What do you think of this? Do you have any better solutions? I have tried to compress the PNG image,but useless, because the PNG is a lossless compression format. I have tried the JPG format as launch image, but the Xcode can't compile successfully, I am not sure why..
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
06/02/14 07:13 AM (10 years ago)
I too have noticed that problem of the images causing the app to be heavy. I don't have a solution. You can try png crush tools. I simply say to myself, "WiFi is fast, smartphone have lots of memory, it's not a problem" ( I try to fool myself :-) -- Niraj
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 07:41 AM (10 years ago)
hi, Niraj if I prepare those 5 images, then how can I name them? cause in the code, there are only 1 image can be pointed... [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"YourImageName.png"]]];
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/02/14 07:54 AM (10 years ago)
Cause in the ipad , the launch image will be the double one : https://www.dropbox.com/s/98nxe96ilyg1b4y/ipad_launch.jpg How can I set to be the full screen one?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
06/02/14 08:40 AM (10 years ago)
Specify the non-retina image filename, such as panda.png Then iOS will pick up the correct one based on the device and orientation. I learned a lot by slowly and carefully reading the section on App Launch (default) Images https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW15 Also, here is a list of filenames for the Launch Images, in case you needed that information: http://www.idev101.com/code/User_Interface/launchImages.html -- Niraj
 
Skywalker
Apple Fan
Profile
Posts: 117
Reg: Dec 25, 2013
上海
1,670
like
06/03/14 12:55 AM (10 years ago)
hi, Niraj The white screen now is gone, but there is another problem, in iphone5, why the game scene can't be full screen, see the following pic,... It used can be, I don't why this happened, will the code I change above as you guys told will affect this? https://www.dropbox.com/s/xrf5xa889ajjvp6/Notfullscreen.jpg
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.