This text is replaced by the Flash movie.

Archive for April, 2010

UIColor Color Codes

April 18th, 2010

DigitalColor Meter Icon I Just realize how hard it was to just assign RGB Values color by code using UIColor, Well heres a little work around. Using the utilities in mac, which will you can find at Applications/Utilities folder. Open it.

DigitalColor Meter

Make sure you selected "RGB As Percentage", Use your mouse to move the cursor over the pixel you want to sample, and read off the values, once you got the color you want; press Command-Shift-H, This will hold the color values you got for the moment. Press F4 for Dashboard use calculator,

Dashboard Calculator

Divide the values you got to 100, for example R%: 78.8 = .788; Then you can finally put the RGB values on your UIColor parameter.


#define COLOR_FOR_THIS [UIColor colorWithRed:0.788f green:0.207f blue:0.271f alpha:1.0f]

NSZombieEnabled Causes memory Leak.

April 10th, 2010

Xcode's InstrumentNoobie Mistake while trying to traced memory leak with the app I am working on using the instrument provided by xcode , I got series of pink spikes,

Xcode's Leaking Instrument

and I'm not sure what was causing it, I thought that the managedObject Context was the culprit. I noticed tons of _NSZombie_ prefix listed and I remember that I added the NSZombieEnabled tag under the Argument in "Executable App Info",

Xcode NSZombieEnabled

I added NSZombieEnabled environment variable because it can be helpful to track down the elusive object causing the problem, mostly tracing the EXC_BAD_ACCESS error message. So after I disabled it, the app I am working on had no leak after all.

Xcode's No Leak Instrument