i have a method i got colorWithHex, that lets me send a string like ffaa29 (hex) and get a UIColor. The method works. if i do
self._mainConsole.textColor = [self colorWithHexString: choice];
I can set the color. But the problem is i want to store the color. For example if they enter an invalid color i’d want to return the current color.
When i do this it doesn’t work.
self.foregroundColor =[self colorWithHexString: choice];
self._mainConsole.textColor = self.foregroundColor;
Instead it goes black which to me sounds like its going to 000000. Now in my test ipad it works in one spot as above but not another. On a testers ipad 1 the second method doesnt work at all. What am i missing? could there be a memory issue?
Mike
You are using a weak property to hold your color. That means it will be replaced with
nilas soon as there is no other strong reference to your color object. Change your property tostrongand everything should work as expected.