Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 109

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
01/09/14 02:25 PM (11 years ago)

Remove White 3.0 Loading Screen

Hi All, Does anyone know how to remove the white screen with a spinning wheel on BT3.0 (so it looks like BT2.0)? iOS. Jake
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
01/09/14 04:37 PM (11 years ago)
I'm not sure about removing it..the white screen is part of the loadConfigDataViewController process that runs when the app launches, so there is going to be a pause before the main screen loads either way. I also wasn't too fond of the white screen, so I had the idea to use an image instead of a white background...that way it pretty much behaves in the same way that the splash screen plugin does. Your app will show a splash image when it launches, and then it will fade to the main view. This is pretty easy to do - just go to the viewDidLoad method of loadConfigDataViewController.m and you will see this line of code which is the cause of the white background---- [self.view setBackgroundColor:[UIColor whiteColor]]; paste over it with this line of code ("splashPic.png" would obviously be replaced with your own image name)---- [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"splashPic.png"]]]; There is one more step if you want it to be a smooth transition. You will notice that the splash image will still fade to a black screen for a second before fading in the main view. This is because of the "temporary window" that was set up in the appDelegate Go to appdelegate.m, in the didFinishLaunchingWithOptions method and find this line of code ---- [tmpWindow setBackgroundColor:[UIColor clearColor]]; paste over it with the same line of code you used in the loadConfigDataViewController method ---- [tmpWindow setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"splashPic.png"]]]; After doing the above, you should have a smooth splash transition instead of a harsh white background. Of course, if you want to simply make it black instead of white you could do that too by replacing "whiteColor" with "blackColor"
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/10/14 06:09 PM (11 years ago)
Nice work, Absentia! :-)
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
01/14/14 03:09 PM (11 years ago)
Thx Absentia, just a small typo I would like to correct, as the second part should be exchanged with: [tmpWindow setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"splashPic.png"]]];
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
01/14/14 05:32 PM (11 years ago)
Oh, yep you're right..good catch
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
06/12/14 10:11 AM (11 years ago)
Still good - thanks for this; it really starts to add the finishing touches to an app.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
02/04/15 04:23 PM (10 years ago)
still some problems with the different screen sizes. How did you handle that Absentia? I would like the image to be the same as the launch images as they are handled perfectly, any ideas?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
05/05/15 05:43 AM (10 years ago)
This could help @Leon http://www.buzztouch.com/forum/thread.php?fid=E7BF98950201773035AF6F2&tid=E7BF98950201773035AF6F2" I'm currently checking myself or something like this: if([rootDevice isIPad]){ UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [tmpWindow setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"yourImageNameLarge.png"]]]; [self setWindow:tmpWindow]; }
 

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.