[TIMOB-11876] iOS 6: Drop shadow in navigation bar cannot be disabled through Titanium
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-10-07T20:35:17.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0 |
| Components | iOS |
| Labels | module_navbar, qe-closed-3.2.0, qe-testadded |
| Reporter | Peter Varadi |
| Assignee | Vishal Duggal |
| Created | 2012-10-10T09:09:43.000+0000 |
| Updated | 2013-11-07T19:14:57.000+0000 |
Description
*Feature description*
iOS 6 automatically adds drop shadow to the navigation bar that cannot be disabled through Titanium (2.1.3).
*Proposed solution*
See the objective-c solution here: http://stackoverflow.com/questions/11084331/how-do-i-disable-the-navigation-bar-shadow-in-ios-6-for-navigation-bars-with-cus
controller.navigationBar.shadowImage = [[[UIImage alloc] init] autorelease];
controller is a UINavigationController.
This should driven by a Property that we can enable disable on Window(?) or on NavigationGroup. Whatever makes more sense.
I could really use this. I'm doing a custom navbar with search and now it adds a shadow between them...
Yep. I'd like the ability to remove this also. Wrecks my layout and design. Any possible quick fix?
Did someone find a quick fix yet? That little drop shadow is annoying.
Is this seriously still not fixed...
Interested in this feature as well. +1
ping
I fixed this in an app I'm currently developing, here is the "how to": http://exygy.com/titanium-how-to-remove-navigation-bar-drop-shadow-in-ios-6/
bump
Test Case
/* Modes 0 - No customization 1 - Bar Image Only 2 - Bar Image + Hide Shadow 3 - Bar Image + Custom Shadow */ var count = 0; function openListener(e) { count = count+1; } function closeListener(e) { count --; } function clickListener(e){ nav.openWindow(genWin()); } function genWin() { var temp = count % 4; var win = Ti.UI.createWindow({ backgroundColor:'white', title: 'MODE '+temp }) var str = 'MODE = '+temp+'\n'; if (temp > 0) { win.barImage = 'images/slider_orangebar.png' str += 'barImage = images/slider_orangebar.png\n'; } if (temp == 3) { win.shadowImage = 'images/slider_orangebar.png' str += 'shadowImage = images/slider_orangebar.png\n' } if (temp == 2) { win.hideShadow = true; str += 'hideShadow = true' } var label = Ti.UI.createLabel({ text:str }) win.add(label); win.addEventListener('click',clickListener); win.addEventListener('open',openListener); win.addEventListener('close',closeListener); return win; } var nav = Ti.UI.iOS.createNavigationWindow({ window:genWin(), orientationModes:[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT] }) nav.open();Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4750
Tested and verified the fix with: Titanium Studio, build: 3.2.0.201310310121 Titanium SDK, build: 3.2.0.v20131031141643 Xcode 5.0 CLI 3.2.0 iOS 6 and 7 Simlator Devices: iPhone5s iOS 7.0.2 iPad4 iOS 6.0.1 Navbars are displayed according to set modes