Dans l'une de l'application iPad, je travaille j'ai ajouté des vues personnalisées à une vue.Cela fonctionne bien, mais maintenant je veux supprimer toutes les vues personnalisées ajoutées.Comment puis-je faire cela?Comment supprimer des customviews ajoutés par mode de programmation?
Après mon code pour ajouter des vues personnalisées
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++;
}