Archive for the ‘UIView’ Tag

Custom UIViewControllers, Their Views, and Their Memory Management   4 comments


Download ExampleDifficulty: easy moderate challenging

UIViewControllers serve as backbones in your iPhone or iPad application. Although they are in charge of many other aspects, including user input and output, a task that is somewhat being overlooked is managing memory. In this article, we’ll see how a UIViewController is in charge of its own and its views’ memory footprint, when and how the system can reclaim the memory, and how to control the process. Although this post will benefit all programmers, it relates more to those who manually code their view hierarchy or parts of it, as oppose to relying on Interface Builder and nib/xib files for the job; as your app grows in code size and you learn to write more reusable code, the more relevant this post becomes.

Read the rest of this entry »