[AC-5550] iOS: rightNavButton blinks on navigation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2018-02-05T08:17:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios |
Reporter | Philippe Wueger |
Assignee | Shak Hossain |
Created | 2018-01-26T09:00:03.000+0000 |
Updated | 2018-02-06T08:36:48.000+0000 |
Description
When opening a second window in a navigation window with the same rightNavButton set as the first window, the button is faded out during opening and then reappears instantly when the second window is open. See attached screen recording.
This does not look nice and was not the behavior in previous versions of the Ti SDK, where the button did not fade out.
app.js:
var btn = Ti.UI.createButton({
title: 'Trigger'
});
var win = Ti.UI.createWindow({
rightNavButton: btn
});
var nav = Ti.UI.iOS.createNavigationWindow({
window: win
});
btn.addEventListener('click', function() {
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
rightNavButton: btn
});
nav.openWindow(win2);
});
nav.open();
Attachments
File | Date | Size |
---|---|---|
RightNavButton.mov | 2018-01-26T08:59:55.000+0000 | 228941 |
RightNavButton-SDK7.mov | 2018-02-01T20:45:09.000+0000 | 693261 |
RightNavButton-Ti522-iOS93.mov | 2018-01-26T21:18:40.000+0000 | 288871 |
Hey there! Which kind of SDK-versions indicate that it was working? From your test-case, you are referencing one button for both scoped (two different windows) which should not be allowed. In any case, if you are able to provide more details on when it was working, we may be able to trace back the issue. [~vsingh] This seems related to what we talked about recently.
Hi. Thanks for your quick reply. It works with Ti 5.2.2 and iOS SDK 9.3. See attached screen recording [^RightNavButton-Ti522-iOS93.mov]. Could of course also be an iOS SDK behaviour change. Also tried creating a separate button for the second window:
The button also fades out and reappears with this code (with Ti 6.3.0 and iOS 11.2).
I've just tested on 7.0.1.GA and it seems to work fine, see
RightNavButton-SDK7.mov
for details. Let me know your thoughts! Please note that your env currently says 6.3.0 which does not officially support iOS 11.2.The behavior in your screen recording is the same as in Ti SDK 6.3.0. The button of the first window fades out and the button on the second window appears instantly. The thing is I want to have the same text (or icon) as a button in the navigation bar on the first and second window. Now if a button with the same text first fades out and then appears again instantly it looks funny. But it may be a behavior change in the iOS SDK. I will still check this out on my side.
[~philet] We found out that this is an issue caused by 11.2 (same for native apps). Read more [here](https://stackoverflow.com/questions/47754472/ios-uinavigationbar-button-remains-faded-after-segue-back) and find a fix in TIMOB-25675, thanks to [~vijaysingh]!
The fix of TIMOB-25675 unfortunately does not solve my problem. I've tested it out with a native app too and the problem exists there too. So this is a problem with iOS SDK 11.2 and not of the Ti SDK.
[~philet] So you applied the fix manually to your SDK in
~/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/iphone/Classes/TiUIiOSNavWindowProxy.m
, did a clean build and tested on iOS 11.2 afterwards? If so, you should file another radar at Apple about this. Interesting that they broke so many UINavigationBar related items in 11.2. We will eventually also file a radar for this, so Apple is able to prioritize the issue.I am still on Ti SDK 6.3.0. So I tested the fix there. I opened the generated iPhone project, applied the fix and ran the app directly from Xcode. OK, I will file a radar for this.
Thanks [~philet]! We'll try to reproduce it again anyway to ensure it's properly tracked here as well.