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?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.