You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off - great functionality, thank you a lot for sharing!
One question: how can I color certain states (example 3) programmatically without the need to click on them? E.g., if I have a changing variable "isSunny" for each state (to indicate whether it is sunny in its capital at that time) and I would like to color the state green or red based on whether isSunny is 1 or 0.
I notice that inside "map setClickHandler:^(NSString* identifier, CAShapeLayer* layer){" of -(void)initExample2 I can write, e.g., "layer.fillColor = [UIColor redColor].CGColor;" to color the clicked state red - but how can I do this without clicking? I.e., I guess the key detail I'm missing is how can I refer to a state's identifier and use that to color the state?
The text was updated successfully, but these errors were encountered:
First off - great functionality, thank you a lot for sharing!
One question: how can I color certain states (example 3) programmatically without the need to click on them? E.g., if I have a changing variable "isSunny" for each state (to indicate whether it is sunny in its capital at that time) and I would like to color the state green or red based on whether isSunny is 1 or 0.
I notice that inside "map setClickHandler:^(NSString* identifier, CAShapeLayer* layer){" of -(void)initExample2 I can write, e.g., "layer.fillColor = [UIColor redColor].CGColor;" to color the clicked state red - but how can I do this without clicking? I.e., I guess the key detail I'm missing is how can I refer to a state's identifier and use that to color the state?
The text was updated successfully, but these errors were encountered: