title: OOP - Using a UIView to coordinate multiple subviews?
body: <p>This is an Object Oriented Programming question:</p>
  
  <p>So I am trying to build a UIView class that displays scatter plot. In my current implementation, I've created a datasource protocol that allows the chartView to ask for all the info it needs to plot the its data. </p>
  
  <p>As it stands right now, when someone initializes the chartView and gives it a datasource, the chartview creates/manages several subviews: a 'dotsView' that displays all the data points, a scrollview to which the dotview is added (so it is scrollable), and a 'skeletonView' that sits in the background and displays other chart data like grid lines.</p>
  
  <p>This system at first worked great, however, I decided that i'd like to animate changes to the points, and so i began to contemplate using a collectionView  in lieu of the 'dotsView' placed within the scrollview since it'll handle the animation for me. However, as a collectionview would require a delegate, datasource, layout object, etc, all the sudden my chartView seems to looks more and more like a controller and not a view.</p>
  
  <p>Now here is my question: Is it the wrong approach to allow a UIView to coordinate/configure other UIViews, even if those UIViews are a fundamental requirement of the whole? On the one hand, I'd love to preserve the simplicity of my chartView's public interface (initialize the view, give it a datasource, and you're done). On the other hand, this chartView is really not a view anymore, its more like a controller. But I don't want a consumer of my chart to think/treat it like a controller, I want them to use it as a view.</p>
  
  <p>Any thoughts? I'd love to hear the insights of others.</p>
  
  <p>Thanks!</p>