Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25560] iOS: extendSafeArea property not behave properly if tabBarHidden = true or navBarHidden = true.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-12-15T18:35:48.000+0000
Affected Version/sRelease 6.3.0
Fix Version/sRelease 7.0.1
ComponentsiOS
Labelsios11
ReporterVijay Singh
AssigneeVijay Singh
Created2017-11-27T04:50:34.000+0000
Updated2017-12-20T22:42:47.000+0000

Description

As [~l0wb1rd] and [~ben.bahrenburg@gmail.com] has put their comment in TIMOB-25267 - If 'extendSafeArea = false' in a NavigationController and navBarHidden: true, safe area at the top is not respected. Only happens with navBarHidden on the window. Similarly if 'extendSafeArea = false' in a TabGroup and 'tabBarHidden: true', safe area at the bottom is not respected. Test Case (NavigationBar) -
var win = Titanium.UI.createWindow({
    backgroundColor: 'red',
    title: 'Red Window',
    extendSafeArea:false,
    navBarHidden: true,
});
win.add(Ti.UI.createLabel({text: 'Hello from Top', top: 0}));
win.add(Ti.UI.createLabel({text: 'Hello from Bottom', bottom: 0}));
 
var nav = Titanium.UI.iOS.createNavigationWindow({
   window: win
});
 
nav.open();
Test Case (TabBar) -
var win = Ti.UI.createWindow({
    backgroundColor: 'blue',
    extendSafeArea:false,
    tabBarHidden : true,
});
win.add(Ti.UI.createLabel({text: 'I am at top',top: 0}));
win.add(Ti.UI.createLabel({text: 'I am at bottom',bottom: 0}));
 
var tab = Ti.UI.createTab({
    window: win,
});

var tabGroup = Ti.UI.createTabGroup({
    tabs: [tab]
});
tabGroup.open();

Comments

  1. Vijay Singh 2017-11-30

    PR (master) - https://github.com/appcelerator/titanium_mobile/pull/9638 PR (7_0_X) - https://github.com/appcelerator/titanium_mobile/pull/9658 Test cases are mentioned in ticket description.
  2. Abir Mukherjee 2017-12-15

    FR passed. Merged PR for 7.0.1.
  3. Samir Mohammed 2017-12-20

    *Closing ticket.* Verified Fix in SDK version 7.0.1.v20171218104141 and 7.1.0.v20171220095337. Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile/pull/9638 7.0.x: https://github.com/appcelerator/titanium_mobile/pull/9658

JSON Source