Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (3.4.0)
Viewing all articles
Browse latest Browse all 66

SDK 3.4 gradient exceptions in Xcode 6, iOS 7.1 and 8.0

$
0
0

It seems that in 3.4.0RC the behaviour of background gradients has changed. I have a number of places where I am using gradients, some defined in code, some in the TSS file. They used to work as expected, but now give this error:

[ERROR] :      message = "Invalid type passed to function";
[ERROR] :      nativeLocation = "-[TiGradient setColors:] (TiGradient.m:168)";
[ERROR] :      nativeReason = "expected: Array, was: Object";
The code for the backgroundGradient is:
{
 type: 'linear', 
 startPoint: { x: '50%', y: '0%' },
 endPoint: { x: '50%', y: '100%' },
 colors: [ { color: "#ffffff", offset: 0.0},
 { color: "#f0f0f0", offset: 1.0 } ] 
}
and the TSS is:
".editor" : {
   backgroundGradient: { type: 'linear', startPoint: { x: '50%', y: '0%' }, endPoint: { x: '50%', y: '100%' }, colors: [ "#87C2E5", "#305582" ]},
},
These are being applied to views created with $.UI.create('View', {...})

Using either code or TSS to set the background gradient causes this error.

Ti SDK 3.4.0RC, Mac OS 10.9.4, Xcode 6.0.1, Simulator iOS 7.1 and 8.0.

Any ideas?


Viewing all articles
Browse latest Browse all 66

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>