I am trying to store images and strings inside a Dictionary in the manner UIImage: String. The UIImage would be the key and the String would be the value. There are several key:value pairs and each key and each value are unique.
I want to take a certain, single key (which I won't know in advance) and extract from that dictionary the corresponding value.
After extracting that value from the key:value pair of that dictionary then I want to store that single value in a variable as a string.
Then I want to compare that variable to another variable containing a string.
I'm experiencing difficulty because the comparisons never seem to work. There should be comparisons that correspond as boolean True.
Is there any flaw to what I wish to attempt? Am I using the Swift Dictionary correctly?
I want to take a certain, single key (which I won't know in advance) and extract from that dictionary the corresponding value.
After extracting that value from the key:value pair of that dictionary then I want to store that single value in a variable as a string.
Then I want to compare that variable to another variable containing a string.
I'm experiencing difficulty because the comparisons never seem to work. There should be comparisons that correspond as boolean True.
Is there any flaw to what I wish to attempt? Am I using the Swift Dictionary correctly?