[TIMOB-28566] iOS: "borderRadius" and "viewShadowColor" not updating when changing display mode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-10-29T18:17:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.2.0 |
Components | iOS |
Labels | darkmode, ios, theme |
Reporter | Hans Knöchel |
Assignee | Joshua Quick |
Created | 2021-10-22T20:52:59.000+0000 |
Updated | 2021-10-29T18:17:23.000+0000 |
Description
The two properties use the raw / low-level CGColor references natively, so we need to listen for trait collection updates to re-render them. This is a common best practive natively as well.
Example:
app.js:
const win = Ti.UI.createWindow({ backgroundColor: 'backgroundColor' });
win.add(Ti.UI.createView({
borderRadius: 100,
width: 200,
height: 200,
backgroundColor: 'red',
borderWidth: 5,
borderColor: 'foregroundColor',
viewShadowRadius: 50,
viewShadowColor: 'foregroundColor'
}));
win.open();
semantic.colors.json:
{
"backgroundColor": {
"light": "#ffffff",
"dark": "#000000"
},
"foregroundColor": {
"light": "#000000",
"dark": "#ffffff"
}
}
PR: https://github.com/appcelerator/titanium_mobile/pull/13137