title: How to clear the content of subview before drawing
body: <p>i use two blocks to draw some buttons on my subview dynamically. One calculates frames for Portrait mode and the other does for Landscape. It works well but when i rotate, it writes over the old ones. Hence, some of my buttons come twice. Here is my code of detecting the oriantation:</p>
  
  <pre><code>//i have defined blocks in viewDidLoad: and everything is ok till here
      - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
      {
          if(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
          {
              dispatch_async(dispatch_get_main_queue(), PortraitBlock);        
          }       
          else 
          { 
              dispatch_async(dispatch_get_main_queue(), LandscapeBlock);
                 }
          return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || 
                  interfaceOrientation == UIInterfaceOrientationPortrait || 
                  interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
                  interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
      }
  </code></pre>
  
  <p>Now, how can i clean the view i add the buttons on?</p>
  
  <p>Note: I add buttons on a UIView object, and that object too is on a UIScrollView object</p>