title: How to count subviews in Super View
body: <p>I have one class in which i have two method _addView() and _removeView().</p>
  
  <p>And these method i am using in another class for adding view and removing view but its not working.If i am using in the same then its working.</p>
  
  <p>For Remove-</p>
  
  <pre><code>- (id)deleteBoxAtIndex:(int)boxIndex{      
      for (int i = 0; i &lt; [[self subviews] count]; i++ ) {
          [[[self subviews] objectAtIndex:boxIndex] removeFromSuperview];
      }
  
      return self;
  }
  </code></pre>
  
  <p>Then how i count the subviews in that class or remove from that class.</p>