Skip to content
This repository has been archived by the owner on Nov 30, 2019. It is now read-only.

Bug. Using a variables in an array. #2

Closed
popcorno opened this issue Dec 4, 2012 · 2 comments
Closed

Bug. Using a variables in an array. #2

popcorno opened this issue Dec 4, 2012 · 2 comments
Assignees

Comments

@popcorno
Copy link

popcorno commented Dec 4, 2012

I found a bug when using the library. I can not use variables in the array construction.
Maybe I incorrect use this library?

Json file:
{
"Variables": {
"lightBlueColor": [[13, 107, 180, 1.0]],
},
"MyButton": {
"titleColor": [["$lightBlueColor", "normal"], ["white", "highlighted"]],
},
}

Error:
-[__NSArrayM intValue]: unrecognized selector sent to instance

File: UISSColorValueConverter.m, line 167
// red = [[array objectAtIndex:0] intValue] / 255.0f;

@ghost ghost assigned robertwijas Dec 6, 2012
@robertwijas
Copy link
Owner

You don't have to put color array into another array. Change it to:

"lightBlueColor": [13, 107, 180, 1.0],

You only have to wrap property values that are of array type, for example:

"tintColor": [[13, 107, 180, 1.0]]

but for string value it should be:

"tintColor": "red"

I know it's not perfect. But it's the easiest way to distinguish between array value and array of values with different UIAppearance axis parameters.

@popcorno
Copy link
Author

popcorno commented Dec 7, 2012

Thanks for your answers!

DavinAhn added a commit to ridi/UISS that referenced this issue Jul 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants