2010-08-17 37 views
3

我在调用UIView继承类的-drawRect:中调用UIGraphicsGetCurrentContext()。然后在scrollView上添加视图。在-scrollViewDidEndZooming:withView:atScale:我正在启动视图的-setNeedsDisplay。因此调用UIGraphicsGetCurrentContext()会给出内存警告。UIGraphicsGetCurrentContext()给出了内存警告!

请任何人都帮我解决这个问题。

+0

什么是警告? – visakh7 2011-03-03 12:00:19

+0

有多个内存警告会将自己展示给iOS应用程序? – twilson 2012-02-07 23:07:00

回答

0

didReceiveMemoryWarning与单个函数调用无关。当您的应用程序由于内存泄漏而经常使用太多内存时会调用它。