Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug. Using a variables in an array. #2

Closed
popcorno opened this Issue · 2 comments

2 participants

Sergey Bugaev Robert Wijas
Sergey Bugaev

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;

Robert Wijas robertwijas was assigned
Robert Wijas
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.

Robert Wijas robertwijas closed this
Sergey Bugaev

Thanks for your answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.