I have a CALayer with some image contents. When a button touched, I want to remove the contents from the layer, and I use this code:
[m_aCellLayer setContents:nil]
but I get EXC_BAD_ACCESS exception when executing above line. Do you have any idea why?
Just the obvious stuff: is m_aCellLayer valid when you make this call, or has it been deallocated? Did you try NSLog()ing it just before you make the call?