[TIMOB-28302] macOS: Add checkbox style to Ti.UI.Switch
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-03-05T15:56:59.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 10.0.0 |
| Components | Mac |
| Labels | checkbox, ios, macos, style, switch |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2020-12-19T06:16:14.000+0000 |
| Updated | 2021-03-05T15:56:59.000+0000 |
Description
*Summary:*
Apple's
UISwitch support a checkbox style for Mac Catalyst apps as of Big Sur.
https://developer.apple.com/documentation/uikit/uiswitchstyle
*To-Do:*
Titanium's Ti.UI.Switch currently supports an Android-only [style](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Switch-property-style) property which can be assigned the following constants...
* [Ti.UI.Android.SWITCH_STYLE_CHECKBOX](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android-property-SWITCH_STYLE_CHECKBOX)
* [Ti.UI.Android.SWITCH_STYLE_SWITCH](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android-property-SWITCH_STYLE_SWITCH)
* [Ti.UI.Android.SWITCH_STYLE_TOGGLEBUTTON](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android-property-SWITCH_STYLE_TOGGLEBUTTON)
We should move those constants to the Ti.UI module and add support for iOS builds. The TOGGLEBUTTON constant is Android-only and iOS should default to the SWITCH style instead.
*Note:*
iOS (ie: iPhone/iPad) does not support the checkbox style. This is only support by macOS apps. So, iOS app should use the switch style when assigned a checkbox style.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12353
FR Passed, waiting on Jenkins build and backport.
merged to master and 10_0_X for 10.0.0 release target.