[TIMOB-25775] iOS: Cannot get gradient properties after creation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-05-18T15:18:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.3.0 |
Components | iOS |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2018-02-13T11:55:05.000+0000 |
Updated | 2018-06-11T16:02:56.000+0000 |
Description
Triggered by TIMOB-9366, a developer might want to receive gradient properties after creating the gradient. Example:
var win = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var gradient = {
type: 'radial',
startPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0
};
var radialGradient = Ti.UI.createView({
width: 100,
height: 100,
backgroundGradient: gradient
});
win.addEventListener('open', function() {
console.log(radialGradient.backgroundGradient.colors.join(', ')); // CRASH!
});
win.add(radialGradient);
win.open();
This does not only effect the "colors" key but also "startPoint", "endPoint" and "type".
PR (master): https://github.com/appcelerator/titanium_mobile/pull/9819
FR Passed, Waiting for Jenkins Build to pass.
Closing ticket. Fix can be seen in SDK Version: 7.3.0.v20180607210411 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9819