Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16043] iOS7: Toolbar is overlapping Statusbar

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2018-10-30T17:03:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsStatusbarOverlap, Titanium3.1.3, ios7
Reportertester
AssigneeIngo Muschenetz
Created2013-10-03T12:11:17.000+0000
Updated2018-10-30T17:04:00.000+0000

Description

Create any dummy project and run with above provided environment for IOS7. Actual result: Toolbar is overlapping Statusbar. Expected: No overlapping Found its replica at TIMOB-14283. But it seemed closed without proper fix.

Attachments

FileDateSize
bug.png2013-10-03T12:11:17.000+000014344
Screen Shot 2013-12-17 at 10.24.44 PM.png2013-12-18T06:25:11.000+000039522

Comments

  1. Mostafizur Rahman 2013-10-21

    Hello tester, Please visit [iOS7 Migration Guide](http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_7_Migration_Guide-section-37533766_iOS7MigrationGuide-LightweightWindows) for more details. Thanks
  2. Ritu Agrawal 2013-12-18

    [~ingo] I am reopening this ticket because I can reproduce this issue with the sample code provided in the documentation. Toolbar overlaps with the status bar if the tool bar is positioned on the top (screenshot attached). TIMOB-14283 is a related ticket but not sure if it is the exact same issue as I cannot reproduce this issue with KitchenSink but can with the sample below. You have suggested to set the custom toolbar height in TIMOB-14283 but TIMOB-8263 (custom toolbar height) has been marked as "Won't Fix". We may have to update the documentation if this is not a valid use case, http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.Toolbar
       Titanium.UI.setBackgroundColor('#000');
       
       var send = Titanium.UI.createButton({
           title: 'Send',
           style: Titanium.UI.iPhone.SystemButtonStyle.DONE,
       });
       
       var camera = Titanium.UI.createButton({
           systemButton: Titanium.UI.iPhone.SystemButton.CAMERA,
       });
       
       var cancel = Titanium.UI.createButton({
           systemButton: Titanium.UI.iPhone.SystemButton.CANCEL
       });
       
       flexSpace = Titanium.UI.createButton({
           systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
       });
       
       var toolbar = Titanium.UI.iOS.createToolbar({
           items:[send, flexSpace, camera, flexSpace, cancel],
           top:0,
           borderTop:true,
           borderBottom:false
       }); 
       
       var win = Titanium.UI.createWindow();
       win.add(toolbar);
       win.open();
       
       
  3. Sabil Rahim 2014-01-21

    Please try with this code.
       var send = Titanium.UI.createButton({
           title: 'Send',
           style: Titanium.UI.iPhone.SystemButtonStyle.DONE,
       });
        
       var camera = Titanium.UI.createButton({
           systemButton: Titanium.UI.iPhone.SystemButton.CAMERA,
       });
        
       var cancel = Titanium.UI.createButton({
           systemButton: Titanium.UI.iPhone.SystemButton.CANCEL
       });
        
       flexSpace = Titanium.UI.createButton({
           systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
       });
        
       var toolbar = Titanium.UI.iOS.createToolbar({
           items:[send, flexSpace, camera, flexSpace, cancel],
           top:0,
           borderTop:true,
           borderBottom:false
       }); 
        
       
       // Function to test if device is iOS 7 or later
       function isiOS7Plus()
       {
       	// iOS-specific test
       	if (Titanium.Platform.name == 'iPhone OS')
       	{
       		var version = Titanium.Platform.version.split(".");
       		var major = parseInt(version[0],10);
       
       		// Can only test this support on a 3.2+ device
       		if (major >= 7)
       		{
       			return true;
       		}
       	}
       	return false;
       }
       
       var iOS7 = isiOS7Plus();
       var theTop = iOS7 ? 20 : 0;
       
       var win = Ti.UI.createWindow({top:theTop,statusBarStyle: Titanium.UI.iPhone.StatusBar.LIGHT_CONTENT});
       
       win.add(toolbar);
       win.open();
       
    The [iOS 7 Migration Guide](https://docs.appcelerator.com/platform/latest/#!/guide/iOS_7_Migration_Guide) actually explains this quite well.
  4. Lee Morris 2017-03-20

    Closing ticket as invalid.
  5. Brian Immel 2018-10-30

    Reopening ticket to amend an outdated doc link.

JSON Source