Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23684] iOS: Expose missing iOS8 properties to hide NavigationBar

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-10-27T02:57:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsiOS
Labelsios, navbar
ReporterFlavio De Stefano
AssigneeHans Knöchel
Created2016-07-26T16:27:28.000+0000
Updated2018-05-01T20:20:17.000+0000

Description

Expose the methods described above: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/#//apple_ref/doc/uid/TP40006934-CH3-SW36

Comments

  1. Hans Knöchel 2016-07-27

    PR (community): https://github.com/appcelerator/titanium_mobile/pull/8160 Demo:
       var win = Ti.UI.createWindow({
       	backgroundColor:"#fff",
       	title: "TIMOB-23684",
       	layout: "vertical"
       });
       
       win.add(createButtonWithAction("hidesBarsOnSwipe"));
       win.add(createButtonWithAction("hidesBarsOnTap"));
       win.add(createButtonWithAction("hidesBarsWhenVerticallyCompact"));
       win.add(createButtonWithAction("hidesBarsWhenKeyboardAppears"));
       
       win.add(Ti.UI.createTextField({width: 200,height:50,backgroundColor: "#ccc", top: 20}))
       
       var nav = Ti.UI.iOS.createNavigationWindow({
       	window: win
       });
       
       nav.open();
       
       function createButtonWithAction(action) {
       	var btn = Ti.UI.createButton({
       		title: action,
       		top: 60
       	});
       	
       	btn.addEventListener("click", function() {
       		win[action] = true;
       	});
       
       	return btn;
       }
       
  2. Hans Knöchel 2016-08-03

    Reopening, since it throws an error warning (with throwing an error dialog) when using multiple windows. Fix coming.
  3. Hans Knöchel 2016-08-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/8189
  4. Eric Wieber 2016-09-22

    While testing this, I noticed two things: 1. hidesBarsWhenKeyboardAppears can be set to true, but trying to set it back to false does not change how it functions. The bar still hides when the keyboard appears. 2. hidesBarsWhenVerticallyCompact should hide the bar when an iPhone 5 is in Landscape mode (transitions to a vertically compact environment). It does not do this, for me. [~hansknoechel], if I am misinterpreting the use/function of either of these properties, please let me know.
  5. (deactived) Brian Immel 2016-10-12

    [~ewieber], is this a known issue that should be called out in the SDK 6.0.0.Beta release notes?
  6. Eric Wieber 2016-10-13

    [~bimmel], Hans is investigating/fixing the issues found and they should either be resolved before Beta or will be pushed to 6.1.
  7. Hans Knöchel 2016-10-13

    {quote} 1. hidesBarsWhenKeyboardAppears can be set to true, but trying to set it back to false does not change how it functions. The bar still hides when the keyboard appears. {quote} The value can only be set once per window, so we might update the docs there. {quote} 2. hidesBarsWhenVerticallyCompact should hide the bar when an iPhone 5 is in Landscape mode (transitions to a vertically compact environment). It does not do this, for me. {quote} Actually, we don't support specfic vertical-compact layouts. It's something that is configurable natively in Xcode, but our sizing works different. So I would remove that one from the PR. [~kopiro] Or did you see something?
  8. Flavio De Stefano 2016-10-17

    1) Ok, we should specify that can be set before opening. 2) K!
  9. Hans Knöchel 2016-10-18

    PR's to remove hidesBarsWhenVerticallyCompact and update the docs for the on-creation note: - master: https://github.com/appcelerator/titanium_mobile/pull/8521 - 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8522
  10. Eric Wieber 2016-11-09

    Verified fixed, using: MacOS 10.12 (16A323) Studio 4.8.0.201611020954 Ti SDK 6.0.0.v20161109075403 Appc NPM 4.2.8-9 Appc CLI 6.0.0-69 Alloy 1.9.4 Xcode 8.1 (8B62) The updates/revisions to the PR now have hidesBarsWhenKeyboardAppears and hidesBarsWhenVerticallyCompact}} working as expected. The PR for 6_0_X is actually here: https://github.com/appcelerator/titanium_mobile/pull/8520 and looks good.
  11. Matthew Delmarter 2016-11-29

    @Hans Knoechel - Regarding the comment "we don't support specific vertical-compact layouts. It's something that is configurable natively in Xcode, but our sizing works different. So I would remove that one from the PR." That explains a lot. I am trying to optimised my UI for the iPhone "Plus" sizes in landscape. When rotated to landscape it would be great if I could get the statusbar to hide, which is the default behaviour in most apps now. Is that the "hidesBarsWhenVerticallyCompact" support that we need in order to achieve the functionality I am after? Should I create a new ticket for this feature?

JSON Source