[TIMOB-18119] iOS: Ti.UI.iPhone.StatusBar constants generate invalid warnings on Studio console.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-12-09T22:32:08.000+0000 |
Affected Version/s | Release 3.5.0 |
Fix Version/s | Release 3.5.0, Release 4.0.0 |
Components | iOS |
Labels | qe-3.5.0, qe-assigned |
Reporter | Kajenthiran Velummaylum |
Assignee | Vishal Duggal |
Created | 2014-12-02T05:38:52.000+0000 |
Updated | 2014-12-09T22:32:08.000+0000 |
Description
Ti.UI.iPhone.StatusBar constants are generating following warning message.
[WARN] : Titanium.UI.iPhone.StatusBar.OPAQUE_BLACK DEPRECATED in 3.4.2, in favor of UI.iPhone.StatusBar.LIGHT_CONTENT: REMOVED in 3.5.0
This message is invalid since there is no release version called 3.4.2.
Steps to reproduce
1. Create a classic app using following code
var isDayMode = true,
ios = Ti.Platform.name === 'iPhone OS',
iosFlat = ios && +Ti.Platform.version >= 7,
win = Ti.UI.createWindow({
backgroundColor: '#fff'
}),
label = Ti.UI.createLabel({
text: 'Day Mode', textAlign: 'center',
color: '#000', font: { fontSize: 30 },
top: iosFlat ? 60 : 30, bottom: 0
}),
button = Ti.UI.createButton({
title: 'Switch',
color: '#000',
top: iosFlat ? 30 : 0, height: 30
});
button.addEventListener('click', function() {
isDayMode = !isDayMode;
if (isDayMode) {
ios && (win.statusBarStyle = Ti.UI.iPhone.StatusBar.DEFAULT);
win.backgroundColor = '#ccc';
label.color = button.color = '#000';
label.text = 'Day Mode';
}
else {
ios && (win.statusBarStyle = Ti.UI.iPhone.StatusBar.TRANSLUCENT_BLACK);
win.backgroundColor = '#444';
label.color = button.color = '#fff';
label.text = 'Night Mode';
}
});
win.add(label);
win.add(button);
win.open();
2. Run on iPhone device
This instead should say "deprecated in 3.5.0, removed in 3.6.0"
Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6422 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6423 3.4.2 is a valid release as it is available from the CI build system. Just updating removed version to 3.6.0
Verified fixed using: Titanium SDK 3.5.0.v20141208122514 Studio 3.4.1.201410281743 Xcode 6.1.1 On: iPad mini, iOS 8.1 iPhone 6, iOS 8.2b iPhone 4S Sim, iOS 8.1 Warning message is as Vishal describes.