Please help me construct a multidimensional lookup table, I want to get rid of the damned arrowhead anti pattern and not use ifs and switches at all.
I have two UIControlStates
UIControlStateNormal UIControlStateHighlighted
two sides defined as enums
EnumSideLeft
EnumSideRight
and two shades as enum
EnumShadeLight EnumShadeDark
This is a 2 x 2 x 2 cube. For each cell/combination of three, I have a unique picture.
I want to have a class method that traverses the configuration dictionary and returns a UIimage + a class method that provides the configuration dictionary itself.
But I somehow cannot figure out an effective approach to define that dictionary using modern literals approach + the hierarchy of that cube using dictionary.