Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25871] iOS: Add ability to hide back button on NavigationWindow

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-08-27T16:25:32.000+0000
Affected Version/sRelease 7.1.0
Fix Version/sRelease 7.5.0
ComponentsiOS
Labelscommunity, ios, quick-win
ReporterRene Pot
AssigneeVijay Singh
Created2018-03-15T11:08:16.000+0000
Updated2018-08-27T16:25:37.000+0000

Description

Natively it is possible to hide the backButton programatically using the hidesBackButton attribute. This is discussed in this StackOverflow question: https://stackoverflow.com/questions/614212/how-to-hide-back-button-on-navigation-bar-on-iphone We should consider using this property when the user wants to hide the button.

Comments

  1. Vijay Singh 2018-05-11

    We can expose this property as property of Window - Titanium.UI.Window.hidesBackButton
  2. Vijay Singh 2018-05-14

    PR - https://github.com/appcelerator/titanium_mobile/pull/10043 Test Case -
       var win2 = Titanium.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red Window'
       });
       
       var win1 = Titanium.UI.iOS.createNavigationWindow({
          window: win2
       });
       
       var win3 = Titanium.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue Window',
       });
       
       var button = Titanium.UI.createButton({
           title: 'Open Blue Window'
       });
       button.addEventListener('click', function(){
           win1.openWindow(win3, {animated:true});
       });
       
       win2.add(button);
       var button2 = Titanium.UI.createButton({
           title: 'Open Gray Window(Back Button Hidden)'
       });
       button2.addEventListener('click', function(){
       	win1.openWindow(win4, {animated:true});
       });
       
       win3.add(button2);
       win1.open();
       
       var win4 = Titanium.UI.createWindow({
           backgroundColor: 'gray',
           title: 'Gray Window',
           hidesBackButton: true
       });
       
       var button4 = Titanium.UI.createButton({
           title: 'Close Gray Window'
       });
       win4.add(button4);
       
       button4.addEventListener('click', function(){
           win1.closeWindow(win4, {animated:false}); 
       });
       
  3. Samir Mohammed 2018-07-26

    *Closing ticket*, Verified fix in SDK Version: 7.4.0.v20180726102127 *FR Passed (Test Steps):*

    Created a new titanium application

    Added the above code in to the app.js

    Ran the program

    Opened the blue window (Back button set to visible)

    Back button is visible on the NavigationWindow

    Opened the Gray Window (Back button is set not to be visible)

    Back button is not visible on NavigationWindow

    *Test Environment*
       APPC Studio: 5.0.0.201712081732
       APPC CLI: 7.0.4
       iPhone 6 simulator (11.2)
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13
       Node.js Version: 8.9.1
       Xcode 9.2
       

JSON Source