Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5822] iOS: navbar size wrong after orientation change

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2011-11-14T12:20:39.000+0000
Affected Version/sRelease 1.7.2, Release 1.7.3
Fix Version/sSprint 2011-45, Release 1.8.0.1
ComponentsiOS
Labelsn/a
ReporterBanzai Mobile
AssigneeStephen Tramer
Created2011-10-11T00:43:23.000+0000
Updated2014-06-19T12:44:37.000+0000

Description

Navbar size is scrambled in several ways: 1) does not get thinner when rotating to landscape 2) is repainted at wrong size (thin instead of full) after orientation change back to portrait. E.g.: - on a win with orientationModes set to portrait, open (in tab) a new win with all orientationModes allowed - rotate to landscape, then go back: the previous win forces rotation back to portrait, but its navbar is repainted as if 32px high instead of the correct 44px Neither was a problem in previous SDK versions up to and including 1.7.1
Ti.UI.setBackgroundColor('#000');

var win = Ti.UI.createWindow({
    backgroundColor: 'white',
    navBarHidden:false
});
win.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]

var btn = Ti.UI.createButton({
	top:100, width:200, height:50,
	title:"Open landscape win"
});
btn.addEventListener('click', function () {
	var win2 = Ti.UI.createWindow({
		navBarHidden:false, backgroundColor:'gray'
	});
	win2.orientationModes = [Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT]
	
	var message = Ti.UI.createLabel({
		top:60, left:20, right:20, height:'auto',
		text:"1) Rotate to landscape: navBar is NOT changing to 32px high...\n2) Now press back WHILE IN LANDSCAPE and look at the navBar of root win!"
	});
	win2.add(message);
	tab1.open(win2);
});
win.add(btn);

var tabGroup = Ti.UI.createTabGroup({});
var tab1 = Titanium.UI.createTab({window:win});
tabGroup.addTab(tab1);
tabGroup.setActiveTab(1);
tabGroup.open();

Attachments

FileDateSize
Screen Shot 2011-10-11 at 10.41.14.png2011-10-11T00:43:23.000+000099095
Screen Shot 2011-10-11 at 10.42.06.png2011-10-11T00:43:23.000+0000101147

Comments

  1. Paul Dowsett 2011-10-11

    Thank you for raising this ticket. If you are able to provide all the information described in the [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist) guidelines, *in the correct fields and using the right format*, we will be able to raise it with the core team. Thanks in advance.
  2. Banzai Mobile 2011-10-14

    Paul, I added all the details. Please give priority to this one: we have a published app that on iOS 5 suffers from the well known (and fixed in 1.7.3.x builds) graphics glitch in custom navbars. We cannot update if that means introducing a new graphical glitch ;-) Mario
  3. Banzai Mobile 2011-10-18

    Hello, Paul. Is there anything still missing from my submission? M.
  4. Matthew Apperson 2011-10-20

    Banzia, Is this still an issue with the GA release of 1.7.3? if so, please update the ticket to reflect this. Once that is clarified I will go ahead and accept this ticket. Best regards, Matt
  5. Banzai Mobile 2011-10-21

    Hi Matt, yes it is still an issue with the official released 1.7.3 SDK. Ticket updated. Mario
  6. Eric Merriman 2011-10-23

    Looks fixed by changes present in SDK 1.7.4.v20111021181815, iPod Touch 3rd gen (iOS 4.0.2), iPhone 4s (iOS 5.0), and Simulator 5.0.
  7. Stephen Tramer 2011-11-14

    Tested against 1.8.0.1.5457cb3, iPhone Sim 5.0. Could not reproduce in this version; probably because Blain re-enabled setting the application frame on rotation.
  8. Thomas Huelbert 2012-02-09

    closing as we are not able to reproduce using master (1.9.0 Feb 9 2012 09:46 rd47ce8a4)

JSON Source