更改UIImagePicker的宽高比 [英] change UIImagePicker aspect ratio

查看:89
本文介绍了更改UIImagePicker的宽高比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我试图在我的iOS应用中制作自定义相机。

So im trying to make a custom camera within my iOS app.

我想使相机全屏显示,如手套。

I want to make the camera full screen like snapchats.

但是我找不到任何可以帮助我将宽高比从4:3(默认)更改为16:9(iPhone 5& 5s,4英寸屏幕)的地方。

But i cant find anywhere that will help me change the aspect ratio from 4:3 (default) to 16:9 (iPhone 5 & 5s, 4" screens).

有人能指出我正确的方向吗?

Can anyone point me in the right direction?

推荐答案

在这里可以进行一些无耻的自我提升,但是我有一个相机项目,可以完成您想做的所有事情,此外,您还可以为您的项目进一步自定义它。 GitHub

A little shameless self promotion here, but I have a camera project that does everything you'd like to do, plus you could customize it further for your project. GitHub

它可以为您完成所有切割/调整尺寸/长宽比,同时仍在所有设备上全屏显示。

It does all the cutting / sizing / aspect ratios for you, while still being fullscreen on all devices.

否则,如果您不喜欢github / cocoacontrols /其他地方,还有很多其他选择,也可以通过签出 AVFoundation

Otherwise, There's many other options on github / cocoacontrols / elsewhere if you don't like it. You could also make your own by checking out AVFoundation

这篇关于更改UIImagePicker的宽高比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆