Invert a positive CGFloat to a negative value
3 answers
If myFloat is 44.0, then the -myFloat expression evaluates to -44.0. You have a bug somewhere else in your code. Can you post an expression where it "gives you 0"?
Using a clumsy solution will make your code easier to read and worse, debug it in the long run. Let's sort out the real problem. :)
+4
source to share