私は1つのアプリケーションを開発しています.その中で私はそれを使用しています.それはUIImagePickerController
全画面で開かれます.しかし、私はそのピッカーを真ん中で開く必要がありscreen(50,50,220,380)
ます.
1 に答える
0
次を使用して、画面の中央に浮かぶ素敵なミニチュアカメラimagePickerになりました
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
// imagePickerController.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, nil];
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// imagePickerController.cameraCaptureMode = UIImagePickerControllerSourceTypePhotoLibrary;
UIView *controllerView = imagePickerController.view;
controllerView.alpha = 0.0;
controllerView.transform = CGAffineTransformMakeScale(0.5, 0.5);
[[[[UIApplication sharedApplication] delegate] window] addSubview:controllerView];
[UIView animateWithDuration:0.3
delay:0.0
options:UIViewAnimationOptionCurveLinear
animations:^{
controllerView.alpha = 1.0;
}
completion:nil
];
于 2012-09-26T11:31:51.777 に答える