stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
10/25/15 07:36 PM (9 years ago)

Launch Screen follows with black for second of two

Finally got the hang of launch screens but now when I run the app, the launch screen comes up immediately, as it should, but then, for about a second or so, a white screen pops up with the rotating cogwheel, and then I get to the main screen. Any ideas as to how to get rid of this white intermediate screen? Thanks. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/25/15 08:04 PM (9 years ago)
Thank you for asking this question. I've been telling myself I'm going to document this, and I never do, and I keep going back to an old project, redoing the work, and never documenting it. So for you, me, and everyone else... ;) 1) BT_loadConfigDataViewController.m around line 44 in viewDidLoad. [self.view setBackgroundColor:[BT_color getColorFromHexString:@"#2F4F4F"]]; // [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bgtile.png"]]]; Change the value (#2F4F4F) to something you'd prefer. 2) BT_screen_settingsDevice.m around line 52 in viewDidLoad. add/modify this line: [self.myTableView setBackgroundColor:[BT_color getColorFromHexString:@"#2F4F4F"]]; 3) <yourApp>_appDelegate.m around line 119ish... [tmpWindow setBackgroundColor:[BT_color getColorFromHexString:@"#2F4F4F"]]; self.window.tintColor = [BT_color getColorFromHexString:@"#2F4F4F"]; And I think that should do it. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/25/15 08:38 PM (9 years ago)
Smug, as for your 1) above, I see: //viewDidLoad -(void)viewDidLoad{ [super viewDidLoad]; [BT_debugger showIt:self theMessage:@"viewDidLoad"]; //set background color for loading view... [self.view setBackgroundColor:[UIColor whiteColor]]; It doesn't appear to be the same text as you mention. What changes do I make in this code that I have? It was recently compiled with latest BT version. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/25/15 10:37 PM (9 years ago)
For instance, change this part: [UIColor whiteColor] to this part: [BT_color getColorFromHexString:@"#2F4F4F"] The others are similarly done... they're not showing 'before', just 'after'. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/26/15 06:56 AM (9 years ago)
Ok, I'm at work and will try it when I get home. But will this just change the color of this 1 second transition screen or eliminate it totally so that we just stay on the launch screen until the home screen opens? Steve
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/26/15 10:34 AM (9 years ago)
Stevek, please do use the forum search as these things are pretty easy to find! For this time, here you go: 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:@"loading.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:@"loading.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"
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/26/15 11:03 AM (9 years ago)
LeonG, Thanks for the info. One thing though. You say replace with the image name I want for the opening splash screen. But there are many images, depending upon the size of the screen. That is why I had to put many images in the launchimages folder. So which "loading.png" is appropriate to put in the lines of code you mentioned? Stevek
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/26/15 11:17 AM (9 years ago)
this only works correctly for images until the iPhone 5. All ok if you just the auto zoom for iPhone 6 and 6 Plus, which means you can not add launch images for iPhone 6 and 6 plus. images: loading.png (640x960) & [email protected] (640x1136) image name is obviously up to you.
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/26/15 11:49 AM (9 years ago)
I'm sorry I still don't understand. In the code you gave, one png file goes in. I have many to choose from, all of which are in the launchimages file. What are the dimensions of the one to put in the code should I use that will work with all phones up to the 5 - the 640x960 one, the 640x1136 one or some other? And will the same image work with the ipads? And if a person doesn't have the zoom turned on on his iphone 6, what will he see in the transition from the launch image to the home screen - a partial screen? Sorry for my newbie type of questions but one reason I went with Buzztouch to create apps was to avoid as many of these technical coding questions as possible. I've had to learn a good deal over the years even using BT but this is relatively new stuff and I've been away from the app making process for a year. Steve
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/26/15 04:00 PM (9 years ago)
images: loading.png (640x960) & [email protected] (640x1136) both of them go in your project and you write the "loading.png" in your code. [email protected] will be picked automatically for the bigger screen sizes. Didn't do anything for iPad yet, so can't assist there, you will have to try yourself. The above are not launch images, they should just look the same as the launch image to avoid the black screen between launch image and home menu. Regarding zoom: if you don't have a launch image specified for the iPhone 6 or 6plus, the device will use the iPhone 5 image and use zoom to upscale it: http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions I understand that you would like to avoid technical coding questions, but that is not the way it will work! I can not code myself but you do need to teach yourself some skills and be prepared to google the hell out of the internet + trial and error. At least search the buzztouch forum before you ask, as many things have been asked and solved before!
 

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.