Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26060] iOS: Move iOS-only Ti.UI.iOS.NavigationWindow to cross-platform Ti.UI.NavigationWindow

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-11-15T07:49:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.0.0
ComponentsAndroid, iOS
Labelsn/a
ReporterHans Knöchel
AssigneeVijay Singh
Created2018-05-21T11:43:58.000+0000
Updated2018-11-16T11:44:46.000+0000

Description

On iOS, we have the Ti.UI.iOS.NavigationWindow to handle a stack of windows that can be opened and closed. Unfortunately, on Android and Windows, we have to do that manually and it required the (Alloy) developer to either write custom (per platform) logic or use plugins like [xp.ui](https://github.com/FokkeZB/UTiL/blob/master/app/lib/xp.ui.js). Proposed API-changes: * iOS: Deprecate Ti.UI.iOS.NavigationWindow in favor of Ti.UI.NavigationWindow * Android / Windows: Support NavigationWindow, add the native [back button](https://developer.android.com/training/implementing-navigation/temporal.html) * Android / Windows: Expose the openWindow, closeWindow and popToRootWindow if possible * Adjust Alloy to make the <NavigationWindow> tag available for all platforms This should be done in the Release 7.4.0 timeframe and is a fundamental cross-platform parity improvement.

Comments

  1. Hans Knöchel 2018-05-21

    PR: https://github.com/appcelerator/titanium_mobile/pull/10068 Test-case:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var newNavWindow = Ti.UI.createNavigationWindow({
           window: win
       })
       
       Ti.API.warn('API (new) = ' + newNavWindow.apiName);
       
       var btn = Ti.UI.createButton({
           title: 'Open Modal Window'
       });
       
       btn.addEventListener('click', function() {
           var button = Ti.UI.createButton({
               title: 'Close'
           });
           var modalWindow = Ti.UI.createWindow({
               title: 'Modal Window',
               backgroundColor: 'red',
               rightNavButton: button
           });
           var oldNavWindow = Ti.UI.iOS.createNavigationWindow({
               window: modalWindow
           });
       
           Ti.API.warn('API (old) = ' + oldNavWindow.apiName);
       
           button.addEventListener('click', function() {
               oldNavWindow.close();
           });
           oldNavWindow.open({
               modal: true
           });
       });
       
       win.add(btn);
       newNavWindow.open();
       
  2. Keerthi Mahalingam 2018-09-28

    FR passed.PR merged
  3. Keerthi Mahalingam 2018-10-04

    Verified the fix on SDK 7.5.0.v20181004095510. Works fine. Closing.
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 =7.5.0.v20181004095510
       Device			      = iPhone xs max -ios 12 
       					iPhone 6 -ios 11 simulator
       
  4. Vijay Singh 2018-11-08

    PR - https://github.com/appcelerator/titanium_mobile/pull/10439
  5. Samir Mohammed 2018-11-16

    *Closing ticket.* Verified fix in SDK Version 8.0.0.v20181114074027.

JSON Source