Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15192] iOS7: Splash-Screen flickers/stretches before disappearing

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-09-17T20:35:43.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 19, 2013 Sprint 19 API, Release 3.1.3, Release 3.2.0
ComponentsiOS
Labelsios7, splash-screen
ReporterVincent
AssigneeSabil Rahim
Created2013-09-12T18:46:01.000+0000
Updated2013-10-09T07:13:41.000+0000

Description

test case open Kitchen sink in Simulator or on iPhone (tested on iphone 4) result before disappearing the splashScreen seems to move slightly or stretch to the top.

Comments

  1. Vincent 2013-09-13

    this prevents from having a clean & smooth transition when you re-use the splashScreen as background image for a window. test case 1
       //run this code on IOS7 simulator in 'Retina Tall' mode
       
       (Ti.UI.createWindow({backgroundImage:'Default-568h.png'})).open();
       
    test case 2
       //run this code on IOS7 simulator in 'Retina' mode
       (Ti.UI.createWindow({backgroundImage:'Default.png'})).open();
       
    result: splash screen moves up or stretches before disappearing with: Default@2x.png (640x960) Default-568h@2x.png ( 640x1136) Considering the IOS7 -by default - fullscreen mode, there shouldn't be such a behavior.
  2. Vincent 2013-09-14

    Related Topics in Q&A http://developer.appcelerator.com/question/157139/launch-image-ios-7gm http://developer.appcelerator.com/question/157165/ios7---313-rc---xcode5---icons-and-launch-image
  3. Hans Knöchel 2013-09-14

    Reproduced with SDK 3.1.3.v20130913160104, iOS7 GM, iOS Simulator 4" (Default-568h@2x.png). Expected: Smooth opening of the app. Result: The splashscreen flickers just before focusing the app.
  4. Vincent 2013-09-16

    I had a look to TiRootViewController: view initialization in -loadview
       TiRootViewNeue *rootView = [[TiRootViewNeue alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
       
    the size of the view is then used to set the default Image size in -(void)rotateDefaultImageViewToOrientation: (UIInterfaceOrientation )newOrientation;
       CGRect newFrame = [[self view] bounds]; //wrong for ios7
       
    the problem seems to be there since IOS7 is fullscreen, the defaultImage is unnecessary moved 20 pixels to the top in the following test (still in -(void)rotateDefaultImageViewToOrientation: (UIInterfaceOrientation )newOrientation; )
       
       
       
       if(imageSize.width == newFrame.size.width)
       	{
       		CGFloat overheight;
       		overheight = imageSize.height - newFrame.size.height;
       		if (overheight > 0.0) {
       			newFrame.origin.y -= overheight;
       			newFrame.size.height += overheight;
       		}
       	}
       
  5. Hans Knöchel 2013-09-16

    Thats it! I solved the problem by replacing line 357 in TiRootViewController.m: From: if(imageSize.width == newFrame.size.width) To: if(imageSize.width == newFrame.size.width && ![TiUtils isIOS7OrGreater]) Tested on both iOS 6 & 7. Can someone verify?
  6. Sabil Rahim 2013-09-16

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/4701 3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4702
  7. Korey Sed 2013-09-17

    Hans' fix works. Confirmed on SDK 3.1.3v20130916153052 Using iPhone 4S on iOS7 iPhone 3GS on iOS6.1.4
  8. Eric Merriman 2013-09-18

    This is more visible in simulator than on device. Verified fixed with: Mac OS 10.8.4 Xcode 5 GM seed CLI: 3.1.2 Alloy: 1.2.2-cr Appcelerator Studio, build: 3.1.3.201309072408 Titanium SDK version 3.1.3.v20130917141554 Checked with iPhone 4, iPhone 5, both running iOS 7 GM seed
  9. David Bankier 2013-10-09

    Still getting this issue in 3.1.3.GA using an iPad locked in landscape mode. Hans' code fixes it.
  10. David Bankier 2013-10-09

    Sorry, Hans' code does not fix it - issue persist with iPad in lanscape mode.
  11. David Bankier 2013-10-09

    Sorry ignore my spamming. The splash image size just needed to be changed.

JSON Source