Ajouter UIView en tant que subView sur UIActionSheet

Je travaille sur un projet où je veux montrer UIActionsheet avec trois buttons Changer, Annuler et Terminé et à l'endroit du titre je veux mettre UIView qui a quelques labels. J'ai créé UIView dynamic et je l'ai ajouté à la feuille d'actions, mais son se cachant derrière les buttons, je l'ai essayé par tous les moyens possibles de setFrame, les limites, mais je ne suis pas en mesure de find une solution. Je veux placer cet UIView en haut de UIActionsheet suivi de buttons. Si vous avez des doutes n'hésitez pas à postr des commentaires.

Voici mon code:

-(IBAction)tapbutton:(id)sender { Lablesubview *view = [[Lablesubview alloc]init]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Change" otherButtonTitles:@"Done",nil]; [actionSheet addSubview:view]; [actionSheet showInView:self.view]; } 

Vous pouvez utiliser cette méthode, elle va déplacer tous les buttons de 100 pixels, veuillez noter que ce type de modification peut entraîner le rejet de votre application

 -(IBAction)tapbutton:(id)sender { //create the view Lablesubview *view = [[Lablesubview alloc]init]; //Set the frame view.frame = CGRectMake(0, 10, 320, 100); view.backgroundColor = [UIColor greenColor]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Change" otherButtonTitles:@"Done",nil]; [actionSheet showInView:self.view]; CGRect rect; //expand the action sheet rect = actionSheet.frame; rect.size.height +=100; rect.origin.y -= 100; actionSheet.frame = rect; //Displace all buttons for (UIView *vButton in actionSheet.subviews) { rect = vButton.frame; rect.origin.y += 100; vButton.frame = rect; } //Add the new view [actionSheet addSubview:view]; }