[TIMOB-25379] iOS: Setting "borderColor" wrongly displays a border while "borderWidth" is zero
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 6.0.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | border, engSchedule, ios |
Reporter | Joshua Quick |
Assignee | Unknown |
Created | 2017-10-09T22:40:03.000+0000 |
Updated | 2019-05-14T15:34:37.000+0000 |
Description
*Summary:*
On iOS, if you first set a view's "borderWidth" to zero and then set "borderColor" afterwards, then the view will display a "1dp" border anyways. The zero border width setting is not respected. Note that the order you set the properties is important. You must set "borderColor" -after- setting "borderWidth". This is not an issue for border widths >= 1.
*Test Code:*
var window = Ti.UI.createWindow({ backgroundColor: "black" });
var view = Ti.UI.createView(
{
width: "50%",
height: "50%",
backgroundColor: "blue",
borderWidth: 0,
});
view.borderColor = "yellow";
window.add(view);
window.open();
Ti.API.info("@@@ borderWidth: " + view.borderWidth);
*Work-Around:*
You can work around this issue by setting "borderWidth" after "borderColor" like this.
view.borderColor = "yellow";
view.borderWidth = 1;
view.borderWidth = 0;
*Notes:*
The border width must default to 1dp if the "borderWidth" property has not been assigned. This behavior is expected by Titanium developers here: [TIMOB-25374]
No comments