Matt Rees
Matt Rees

Reputation: 884

UIImagePickerController Size iPhone 5

I'm building an app using the UIImagePickerController and a custom Overlay. With the iPhone 5 screen size adding 88 points but the camera view port staying roughly the same size I was wondering how people have tackled this issue? I'm really against hardcoding values or making assumptions based on screen height, especially with Apple rumoured to be releasing another device with another set of screen dimensions next week.

Upvotes: 1

Views: 1614

Answers (1)

CSmith
CSmith

Reputation: 13458

Unfortunately with this being a private View Controller, you really can't safely probe into it to see what's really going on. What I've determined is that the toolbar has gone from about 54 pixels to about 92, but hard-coding such things is probably going to end up biting you someday.

I ended up rolling my own camera using AVFoundation .... this gave complete control over the scale and location of the preview view, and also any overlay you want to put on top of it.

You can download Apple Samples like SquareCam which will give you much of what you need, and abandon UIImagePickerController altogether.

Upvotes: 3

Related Questions