In one of the iPad Application, I am working I have added custom views to a view. This works fine but now I want to remove all the custom views added. How do I do that?
Following is my code for adding custom views
for (int col=0; col<colsInRow; col++) {
// NSLog(@"Column Number is%d",col);
x=gapMargin+col*width+gapH*col;
//self.styleButton=[[UIButton alloc] initWithFrame:CGRectMake(x, y, width, height)];
ComponentCustomView *componentCustomobject=[[ComponentCustomView alloc] initWithFrame:CGRectMake(x, y, width, height)];
componentCustomobject.backgroundColor=[UIColor redColor];
componentCustomobject.componentLabel.text=[appDelegate.componentsArray objectAtIndex:row];
[self.formConatinerView addSubview:componentCustomobject];
tempCount1++;
}