Migrating a simple application from Application Delegate to ViewController Class
- by eco_bach
Hi
Frst of all wanted to send out a huge thanks for the great feedback and support.
I have a simple application working, right now simply loads a sequence of images and alows the user to step thru the images by clicking a button.
All of my logic is in my Application Delegate class, with the image loading, initialization of UIImage Views etc happening in my applicationDidFinishLaunching method.
My next step is to migrate as much as possible all of the logic from this class to a ViewController, to take advantage of the extra functionality etc in viewcontrollers.
All my images and imageViews are initialized like the following in my applicationDidFinishLaunching.
img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@image1.jpg" ofType:nil]];
imgView = [[UIImageView alloc] initWithImage:img];
How would I migrate this to a ViewController based application?
Where would I put all of the logic currently in my applicationDidFinishLaunching method, or for loading of images, is it necessary to only load them here?
Any feedback, tips, suggestions appreciated.