configuring frame size of UIImagePickerController
来源:互联网 发布:淘宝主图的尺寸 编辑:程序博客网 时间:2024/06/05 15:16
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 -
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
- configuring frame size of UIImagePickerController
- warning: the frame size of 1456 bytes is larger than 1024 bytes
- warning: the frame size of 1040 bytes is larger than 1024 bytes
- warning: the frame size of 1040 bytes is larger than 1024 bytes
- warning: the frame size of 1040 bytes is larger than 1024 bytes
- warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
- thrift — 记关于"Read a frame size of "的痛苦经历
- warning: the frame size of 1040 bytes is larger than 1024 bytes
- size of
- Size of
- size of
- size of
- size of
- webrtc frame rate and size;
- Configuring Application pool of IIS
- copy_from_user: Warning: the frame size of xxx bytes is larger than 1024 bytes 这个警告如何修改
- Introduction Of SSH Frame
- self.view.frame.size.height赋值问题
- 【C#】通过Thrift操作HBase系列(1)
- Java中类的加载
- hdu1520 Anniversary party 树形dp
- 物理学家拟验证宇宙是否为电脑模拟产物
- Java工程师必读的15本经典之作
- configuring frame size of UIImagePickerController
- jquery选择器
- git命令之git clone用法
- PowerDesigner:Reverse Engineer Database 中报错 unable to list the tables
- java环境变量配置
- css实现相对定位实例
- MYSQL 系统函数
- Calling startActivity() from outside of an Activity
- adb命令操作