The -objectForKey: method returns a value of type id , but you are trying to assign it to CGFloat *, which is incompatible with id , because CGFloat is not a class. If you know that the object you are retrieving from the dictionary is a specific type, say, NSNumber, you can take steps to convert it to CGFloat when you receive it.
Also, you are trying to use int as a key in a dictionary, but dictionaries require their keys to be objects too. If you want to access your objects by index, save them in an array instead of a dictionary.
Putting it all together, you will have something like this:
Caleb source share