iPad, iOS6 very long delay between viewWIllAppear and view appearing on the screen

前端 未结 1 1386
旧时难觅i
旧时难觅i 2021-01-15 18:54

I\'m working with a fairly complex storyboard based iPad app. My workflow is as follows A collection view pushes another view, which presents another view modally.

T

1条回答
  •  清酒与你
    2021-01-15 19:07

    After profiling the app, I figured out that two issues were at play:

    1) I was saving large UIImages as binarydata into coredata, which should not be done if NSFetchedResultsControllers are used, as they pulled out all of the image data and kept it in memory.

    2) iOS6 has changed the way viewDidUnload works - it is never called, so I added some calls to manually free up objects when my view controller disappears.

    The end result is that the memory footprint is at around 4mb baseline now, getting higher as I push the previously offending controller. Additionally, I can push/pop the controler mulitple times without out of memory crash.

    enter image description here

    0 讨论(0)
提交回复
热议问题