How to set Camera view aspect ratio in iOS
Some times we face problem with Camera view aspect ratio in ios. Solution to this problem is here.. Set its aspect ratio property to AVLayerVideoGravityResizeAspectFill. It actually preserve aspect ratio; fill layer bounds.
Here are two line code use.
Happy Coding!!!
For such more Blogs you can visit to http://findnerd.com/NerdDigest
- AVLayerVideoGravityResizeAspectFill may be used when setting the videoGravity
- property of an AVPlayerLayer or AVCaptureVideoPreviewLayer instance.
Here are two line code use.
- AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;
- captureVideoPreviewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
Happy Coding!!!
For such more Blogs you can visit to http://findnerd.com/NerdDigest