J'ai un UIView personnalisé que j'ai créé pour afficher mes boutons et ma barre d'outils personnalisés. Lorsque j'ai demandé à ce qu'elle s'affiche, la barre se trouve au-dessus de l'obturateur (ce qui est bien). Mais après le chargement de l'appareil photo, l'obturateur passe devant, puis s'ouvre.
Si vous regardez le camera.app natif, il ne fait pas ça. La barre d'outils reste là tout le temps. Voici mon code :
// .h
UIImagePickerController *theCamera;
@property (nonatomic, retain) UIImagePickerController *theCamera;
// .m
theCamera = [[UIImagePickerController alloc] init];
theCamera.delegate = self;
theCamera.sourceType = UIImagePickerControllerSourceTypeCamera;
theCamera.showsCameraControls = NO;
theCamera.toolbar.alpha = 0;
theCamera.navigationBarHidden = YES;
theCamera.toolbarHidden = YES;
theCamera.wantsFullScreenLayout = YES;
theCamera.cameraViewTransform = CGAffineTransformMakeScale(1.25, 1.25);
UIImageView *tabBarBack = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tab_bar_back.png"]];
tabBarBack.frame = CGRectMake(0, 422, 320, 58);
[customView addSubview:tabBarBack];
theCamera.cameraOverlayView = customView;
[self presentModalViewController:theCamera animated:YES];
Il y a évidemment d'autres boutons que j'ajoute à la customView
mais vous comprenez le concept.