[TIMOB-19522] iOS: Platform parity in Ti.UI.ActivityIndicator "style" property
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-09-16T18:37:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.0 |
Components | iOS |
Labels | activityindicator |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2015-09-15T06:07:35.000+0000 |
Updated | 2015-12-13T20:19:45.000+0000 |
Description
Currently, the
style
property of the Ti.UI.ActivityIndicator
needed to be if-cased for Android, MobileWeb and Windows on the one side and iOS on the other (using the .iPhone.) namespace.
Titanium.UI.iPhone.ActivityIndicatorStyle.BIG
Titanium.UI.iPhone.ActivityIndicatorStyle.DARK
Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN
Titanium.UI.ActivityIndicatorStyle.BIG
Titanium.UI.ActivityIndicatorStyle.BIG_DARK
Titanium.UI.ActivityIndicatorStyle.DARK
Titanium.UI.ActivityIndicatorStyle.PLAIN
For parity, we should migrate the iOS constants to work on the name namespace as the other platforms do and warn the dev about the deprecated namespace like we have done earlier with related use cases.
* Moved
style
value fromTi.UI.iPhone.ActivityIndicatorStyle.\*
toTi.UI.ActivityIndicatorStyle.*
* DeprecatedTi.UI.iPhone.ActivityIndicatorStyle.\*
starting in 5.1.0 * Updated docs to reflect changed behavior Demo code:PR pending: https://github.com/appcelerator/titanium_mobile/pull/7190
Thanks! PR Merged.
Another PR to fix a mistake in last PR: https://github.com/appcelerator/titanium_mobile/pull/7199
Verified as fixed, can confirm that I receive the appropriate message when using the deprecated class:
OSX El Capitan 10.11 Studio: 4.3.1.201509302304 Ti SDK: 5.2.0.v20151009071418 Appc NPM: 4.2.1-1 Appc CLI: 5.1.0-38
I think there's a bug here... In my app, which is named "Housters", the warning in the log states: *[WARN] Titanium.UI.iPhone.ActivityIndicatorStyle.DARK DEPRECATED in 5.1.0, in favor of Housters.UI.ActivityIndicatorStyle.DARK.* This is obviously incorrect, Housters.UI.ActivityIndicatorStyle.DARK doesn't exist. It should say Ti.UI.ActivityIndicatorStyle.DARK. Tested on Ti SDK 5.1.0.GA and iPhone 6 Simulator.
The compiler replaces "Titanium" in the logs when running on devices. It's fixed globally in 5.2.0 as part of TIMOB-20015. Greets!