I would like to resize a window/image in a nib at load time
I have an iPhone app that I'm porting to the iPad. I store several of the ViewControllers in xib's that I would like to resize when they're loaded. For example my startup screen with options is a bitmap that can easily scale up (despite the mis-matched aspect ratio) and I'm开发者_如何学Python trying to figure out where I have ability to resize the image/window during xib loading.
Instead of resizing the nib on load, you should create an iPad version in Interface Builder by "File → Create iPad version Using Autoresize Masks".
To modify the loaded view in run-time, implement the -viewDidLoad
method in your view controller.
精彩评论