CATiledlayer setContents nil give me a crash

203 Views Asked by At

I have a uiview with CATiledlayer. I want to reuse the view, so I wrote:

self.layer.contents = nil; 
[self.layer setNeedDisplay]; 

but I got a random crash. Stack trace follows:

0 libsystem_kernel.dylib 0x3929908c __psynch_cvwait + 24
1 libsystem_c.dylib 0x391f4f19 pthread_cond_wait + 41
2 QuartzCore 0x32d3b205 CAImageProviderSetCallback + 189
3 QuartzCore 0x32dc600d -[CATiledLayer setContents:] + 73
4 TBClient 0x000933ed -[TBRichTextView drawRichTextContent] (TBRichTextView.m:114)

Can anyone help me figure this out?

0

There are 0 best solutions below