Calypso Kid
Aspiring developer
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
01/22/18 06:31 PM (5 years ago)

Fixed background image auto sizing

Hello all A few weeks back I noticed that the background image used in my app was not autosizing in a BT 4 project as it did in BT3. I use this image when the app refreshes so the user knows that something is happening. BT4 project Xcode 9.2 iOS 10 (with hundreds of depreciation warnings) Found this on Stack Overflow fro 2015 BT_Screens bt_loading bt_loading.m line 43 existing code with package is [self.view setBackgroundColor:[UIColor clearColor]]; I changed it to (from Stack Overflow- bottom of page- <a href="" target="_blank" rel="nofollow"></a> ) UIImageView *backgroundImage =[[UIImageView alloinitWithFrame:self.view.bounds]; // This will set image fit to all iphone... backgroundImage.image=[UIImage imageNamed:@"yourimage.png"]; [self.view addSubview:backgroundImage]; It works in the Xcode simulator- all phone sizes Give it a try Dave
Smugger than thou...
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
01/22/18 09:21 PM (5 years ago)
Hey, Thanks Dave! Nabbed and copied! Cheers! -- Smug
Apple Fan
Posts: 4673
Reg: Oct 25, 2010
01/23/18 06:18 PM (5 years ago)
Nice one for figuring this out CKid, good man!

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.