Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20302] iOS: Support showing and hiding the toolbar in Ti.UI.Window

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-02-15T08:58:27.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelsios, qe-5.4.0, toolbar, window
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-02-02T10:22:37.000+0000
Updated2016-06-09T23:16:42.000+0000

Description

There is a [community PR](https://github.com/appcelerator/titanium_mobile/pull/6816) to support hiding and showing the toolbar on iOS (toolbars are not available on Android, yet). Currently the docs and example code are missing, I will assist the community member to cherry-pick his changes and add the docs and test case in a new PR.

Comments

  1. Hans Knöchel 2016-02-02

    PR: https://github.com/appcelerator/titanium_mobile/pull/7725 (Unit tests included) Demo:
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       var nav = Ti.UI.iOS.createNavigationWindow({window: win});
       var isHidden = false;
       
       var btn = Ti.UI.createButton({
         top: 100,
         title : "Hide toolbar"
       });
       
       btn.addEventListener("click", function() {
           if (isHidden === true) {
               win.showToolbar();
           } else {
               win.hideToolbar();
           }
       
           btn.setTitle(isHidden ? "Hide toolbar" : "Show toolbar");
           isHidden = !isHidden;
       });
       
       win.add(btn);
       win.setToolbar([
           Ti.UI.createButton({title: "Toolbar"})
       ], {
           animated: false
       });
       
       nav.open();
       
  2. Chee Kiat Ng 2016-02-15

    APPROVED! PR merged!
  3. Harry Bryant 2016-06-09

    Verified as fixed, toolbar can be hidden and shown. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7.-2 App CLI: 5.4.0-11 Xcode 7.3 Node v4.2.6 *Closing ticket.*

JSON Source