[TIMOB-27480] iOS : Setting last index of TabbedBar after initialization doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-11-12T22:10:09.000+0000 |
Affected Version/s | Release 8.2.1, Release 8.2.0 |
Fix Version/s | Release 8.3.0 |
Components | iOS |
Labels | engTriage, ios, tabbedbar |
Reporter | nicolomonili |
Assignee | Vijay Singh |
Created | 2019-10-17T09:27:32.000+0000 |
Updated | 2019-11-12T22:10:09.000+0000 |
Description
Test with SDK *8.2.0.GA* on iPhone SE Simulator (*iOS 12.2* , *iOS 13.1*)
*Code test*
var win = Ti.UI.createWindow();
var labels = ['1', '2', '3', 'LAST'];
var TabbedbBar = Ti.UI.createTabbedBar({
labels : labels
});
win.add(TabbedbBar);
win.open();
setTimeout(function(){
TabbedbBar.index = labels.length - 1;
}, 2000);
This code work on iOS 12.2 simulator.
This code doesn't work on iOS 13.1 simulator.
Attachments
File | Date | Size |
---|---|---|
ios12-2.png | 2019-10-17T09:26:51.000+0000 | 5771 |
ios13-1.png | 2019-10-17T09:26:51.000+0000 | 6120 |
Tested it and can reproduce on
8.2.1.v20191009074714
. It looks like it does get selected, however, it does not get redrawn properly. Because when you click another item after the selection animation does happen properly.This problem is in native app as well. Apple need to fix it. Until apple fixes it following changes will fix the issue- PR - https://github.com/appcelerator/titanium_mobile/pull/11288
Is there no possibility to temporarily insert this fix into a "continuous integrations builds" ?
[~nicolomonili] This ticket is in review. Once PR get approved it'll get merged and you can get build. Meanwhile you can make the changes in your SDK as this is minor change.
Usually i don't like to change the SDK manually ... in this case i can do a test being a simple change
I tried to manually edit the file *iphone/Classes/TiUIButtonBar.m*. The fix doesn't work. Do i have to do anything other than edit that file?
FR Passed. Last index of TabbedBar gets set when done after initialization. Waiting for Jenkins build to pass before merge.
merged to master
Verified on: Mac OS: 10.14.5 SDK: 8.3.0.v20191030085531 Appc CLI: 7.1.1 JDK: 1.8.0_162 Node: 10.5.0 Studio: 5.1.4.201909061933 Xcode: 11.1 Device: iPhone X(v13.0), iPhone 7Plus(v12.3.1), iOS simulator 13.1, 12.2
In my situation the problem has not been solved. And I found the reason. Test code
In my case i have to update the labels value in some cases, and i noticed that doing this (at least the first time) creates problems with the index set.
I can confirm above code breaks the TabbedBar. For some reason, updating TabbedBar1 breaks TabbedBar2 index setting for me (using CLI 7.1.1/SDK 8.3.0.v20191030085531) When removing the line that says "try to remove this comment" both will work fine for me.
PR (master) - https://github.com/appcelerator/titanium_mobile/pull/11324 PR (8_3_X) - https://github.com/appcelerator/titanium_mobile/pull/11325
FR Passed. Waiting for Jenkins build to pass.
merged to master, 8_3_X
Verified on: Mac OS: 10.14.5 SDK: 8.3.0.v20191112112455, 9.0.0.v20191112112437 Appc CLI: 7.1.1 JDK: 1.8.0_162 Node: 10.5.0 Studio: 5.1.4.201909061933 Xcode: 11.2 Device: iPhone X(v13.2), iPhone 7Plus(v12.3.1), iOS simulator 13.2, 12.4