I am trying to wrap my head around the roles of UIViews and UIViewControllers. If I create and paste subviews programmatically, is it typical to do this from a view or controller?
I'm just wondering if there is an agreement / pattern for this. In my sample application, I load 50 images at runtime, adding them as subzones to the main view, and then letting the user drag and drop them around the screen. I am currently doing initialization in the initWithCoder view:
- (id)initWithCoder:(NSCoder*)coder { if (self = [super initWithCoder:coder]) {
The view also implements Began / touchhesMoved strokes that allow you to drag and drop. My problem arises when I try to access [self frame] .size in initWithCoder but it is not initialized yet. It makes me think that I can upload images in the wrong place ...
iphone cocoa-touch
Chris karcher
source share