Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5550] iOS: rightNavButton blinks on navigation

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2018-02-05T08:17:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsios
ReporterPhilippe Wueger
AssigneeShak Hossain
Created2018-01-26T09:00:03.000+0000
Updated2018-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

FileDateSize
RightNavButton.mov2018-01-26T08:59:55.000+0000228941
RightNavButton-SDK7.mov2018-02-01T20:45:09.000+0000693261
RightNavButton-Ti522-iOS93.mov2018-01-26T21:18:40.000+0000288871

Comments

  1. Hans Knöchel 2018-01-26

    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.
  2. Philippe Wueger 2018-01-26

    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:
       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 btn2 = Ti.UI.createButton({
           title: 'Trigger'
         });
       
         var win2 = Ti.UI.createWindow({
           backgroundColor: 'red',
           rightNavButton: btn2
         });
         
         nav.openWindow(win2);
       });
        
       nav.open();
       
    The button also fades out and reappears with this code (with Ti 6.3.0 and iOS 11.2).
  3. Hans Knöchel 2018-02-01

    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.
  4. Philippe Wueger 2018-02-02

    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.
  5. Hans Knöchel 2018-02-05

    [~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]!
  6. Philippe Wueger 2018-02-05

    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.
  7. Hans Knöchel 2018-02-05

    [~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.
  8. Philippe Wueger 2018-02-06

    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.
  9. Hans Knöchel 2018-02-06

    Thanks [~philet]! We'll try to reproduce it again anyway to ensure it's properly tracked here as well.

JSON Source