UIImagePickerController cameraViewTransform acts differently in iOS 4

后端 未结 4 1892
刺人心
刺人心 2021-01-01 00:37

I upgraded both my iPhone and SDK to iOS 4.0.1 and now my App doesn\'t run the same way it was running in iOS 3.x.

My App uses the UIImagePickerController with a cus

4条回答
  •  清酒与你
    2021-01-01 01:06

    ios 4.0 Magic number 1936/320= 6.05 , 2592/6.05 = 428 , 480-428 = 52 52/(428/2)=0.24299 +1=1.24299

    ios 3.0 Magic number 1536/320=4.8 2048/4.8=427 480-427=53 53/427=0.121412 +1=1.12412

    That is the relationship cameraresolution-screenresolution

    For iOS 3.0 the cameraViewTransform is applied from the top so you have to use all the height. But in iOS4 it is applied from the center of the frame so you have to use the half of the height. And you have to move the frame down (52/2) to leave the frame in the center.

提交回复
热议问题