title: How to set content size of UIScrollView dynamically
body: <p>I got question about <code>UIScrollview</code>.</p>
  
  <p>The story is I have a <code>UIView</code> named ChartsView which I re-draw it myself by override method <code>drawRect()</code>. The content of drawing was generated dynamically. So I do not know its size until runtime. The question is how/where can I set its super view's (scrollView) content size dynamically?Any idea about that?</p>
  
  <pre><code>    - (void)viewDidLoad
      {
          [super viewDidLoad];
  
  // not this way. it's fixed size.....
          ChartsView *chartsView = [[ChartsView alloc]initWithFrame:CGRectMake(0, 0, 320, 800)]; 
  
          self.scrollView.contentSize = chartsView.frame.size;
  
          [self.scrollView addSubview:chartsView];
  
      }
  </code></pre>