configuring frame size of UIImagePickerController
2013-04-18 14:30
330 查看
I experimented with the code from my last post, and commented out the final scale transform ((the one which makes it full size) and I ended up with a lovely miniature camera imagePicker floating in the middle of my screen, so it definitely does work! The exact
code I used, including the zoom/fade-in transition, is -
I'm sure you could customise it more, change the size & location of the camera view.
转帖:http://stackoverflow.com/questions/10164581/configuring-frame-size-of-uiimagepickercontroller
code I used, including the zoom/fade-in transition, is -
[code]UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, nil]; imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; 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 ]; [imagePickerController release];
I'm sure you could customise it more, change the size & location of the camera view.
转帖:http://stackoverflow.com/questions/10164581/configuring-frame-size-of-uiimagepickercontroller
相关文章推荐
- UIImagePickerController as a sub view instead of Modal View
- UIImagePickerController详解
- ios UIImagePickerController 添加一个自定义的view。
- UIImagePickerController 介绍
- iOS8下,UIImagePickerController的popoverPresentationController为空,要怎么获取?
- ios中改变UIImagePickerController页面的button的文字为中文
- UIImagePickerController属性与使用
- 如何去除系统自带的UIImagePickerController 右侧的取消按钮
- UIImagePickerController
- UIImagePickerController详解
- UIImagePickerController导航栏颜色自定义
- iOS摄像头和相册-UIImagePickerController-浅析
- UIImagePickerController自动修改statusbar文字颜色
- ios8.0 ipad UIImagePickerController
- UIImagePickerController拍照与摄像
- UIImagePickerController显示中文界面
- UIImagePickerController
- swift中UIImagePickerController的使用(相机)
- warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
- UIPinchGestureRecognizer 缩放,移动,旋转,UIImagePickerController 横屏,全屏 的实现