Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25775] iOS: Cannot get gradient properties after creation

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-05-18T15:18:00.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeHans Knöchel
Created2018-02-13T11:55:05.000+0000
Updated2018-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".

Comments

  1. Hans Knöchel 2018-02-13

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9819
  2. Samir Mohammed 2018-05-16

    FR Passed, Waiting for Jenkins Build to pass.
  3. Samir Mohammed 2018-06-11

    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

JSON Source