Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28566] iOS: "borderRadius" and "viewShadowColor" not updating when changing display mode

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-10-29T18:17:23.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.2.0
ComponentsiOS
Labelsdarkmode, ios, theme
ReporterHans Knöchel
AssigneeJoshua Quick
Created2021-10-22T20:52:59.000+0000
Updated2021-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"
  }
}

Comments

  1. Hans Knöchel 2021-10-22

    PR: https://github.com/appcelerator/titanium_mobile/pull/13137

JSON Source