UIImagePickerController using iOS 8 cameraViewTransform isn't scaling

前端 未结 1 1669
醉梦人生
醉梦人生 2021-01-15 02:07

I have previously solved a camera overlay issue: like this

CGSize screenBounds = [UIScreen mainScreen].bounds.size;

CGFloat cameraAspectRatio = 4.0f/3.0f;

         


        
1条回答
  •  说谎
    说谎 (楼主)
    2021-01-15 02:57

    In iOS 8 you no longer need to scale if you want to fill the screen. So the unique thing you have to do is to comment the assignment:

    //self.picker.cameraViewTransform

    That is to say, self.picker.cameraViewTransform = CGAffineTransformMakeScale(1.0, 1.0) conforms to self.picker.view.frame automatically.

    In conclusion, the work is already done for you by UIImagePickerController.

    0 讨论(0)
提交回复
热议问题