GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-04-02T19:19:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 07, 2014 Sprint 07 SDK, Release 3.3.0 |
Components | iOS |
Labels | ios7, toolbar, translucent, triage |
Reporter | Matthew Delmarter |
Assignee | Vishal Duggal |
Created | 2013-09-16T06:34:45.000+0000 |
Updated | 2017-03-22T22:11:45.000+0000 |
When adding a Toolbar to a Window Navigation (win.rightNavButton = toolbar), the translucent effects are layering and rendering incorrectly - see the attached screenshot.
As far as I know the Toolbar added to the Window navigation bar is the correct way to have multiple icons in the top nav. This method is used by the native apps like Mail / Safari etc.
Is there another method I should be using?
If not, can this be fixed so that the Toolbar when translucent renders correctly on top of the the already translucent navigation bar.
Can you please add a test case?
Test case as requested, with screenshot of output attached:
Isn't there a workaround at least? This is very problematic, given the (almost) mandatory translucency in iOS7.
[~vduggal], thoughts?
Actually the problem lies in the fact that you have no support for
[controller.navigationItem setRightBarButtonItems:animated:]
as the way to set more than one element on the {right,left}Button area.@Pier I think you hit the nail on the head there. If you search the Q&A forums, users have been struggling since version 1.0 with ways to implement multiple buttons in the navigation bar - and have had to fall back on hacks using Toolbars and ButtonBars. This has cost me tens of hours trying to work around this limitation and still make my apps look "native" down to the pixel on both iPad and iPhone. The ability to add multiple buttons should be a basic feature - enabling us to easily mimic default app layouts like Mail etc. Using a Toolbar for example sounds like a quick "hack-around" but in reality the Toolbar is indented too far in from the left / right, so the buttons added are not sitting in quite the right place. iOS 7 has just made this Titanium limitation more noticeable with the transparency issue. It would be really great to see support for multiple elements in the right/left button areas. Finally. PS: Is there a ticket open about this? I will have a quick look...
In my company we use a (custom made) native module which simply overrides the setRightNavButton of TiUIWindowProxy with an Objective-C categroy, so that when you set a toolbar it simply takes out the items from it and uses them for the rightNavButton. Sounds interesting? :)
Yes very! Tell me more! matthew [at] imattsolutions [dot] com
To everyone looking for the ability to add more than one item in the right nav area, we're pleased to announce this small yet useful module: https://github.com/smclab/TiNavItems
The fix for the issue here is to expose the leftBarButtonItems and rightBarButtonItems properties for navigationItem. That has been done as part of TIMOB-16094. Once the PR is merged in you should be able to set multiple laft and right nav items using the Ti.UI.Window.leftNavButtons and Ti.UI.Window.rightNavButtons properties. For the test case attached here you could do something like
Closing ticket as duplicate and links to the related ticket have been provided above.