Search code examples
iphoneuiviewquartz-2d

Quick Check re How To Implement Multiple UIViews in an iPhone Game


I am going to restructure my game to use multiple uiviews. Is the following flow correct ?

  • I create 6 uiviews ( one for each sprite).
  • game loads root uiview.
  • root uiview init method loads 5 subviews using self addSubview.
  • in the game controller I update each uiview each game tic.
  • the game controller will need a pointer to each Uiview instance.

Thanks all,

Martin


Solution

  • I would probably use the UIViewController for the main view to load the subviews and add them to the main view, not load the subviews directly in the main UIView itself.