ios - How can I scale my imagePickerController camera so it fills the whole screen? -


i have hidden camera controls, leaves big black space. resolve this, looking scale camera fills whole screen. don't know why not able this. code. cheers!

imagepicker.sourcetype = uiimagepickercontrollersourcetype.camera imagepicker.delegate = self imagepicker.allowsediting = false imagepicker.showscameracontrols = false imagepicker.cameraoverlayview = overlayview self.presentviewcontroller(imagepicker, animated: false, completion: nil) 

i believe camera aspect ratio 4/3, you'll have apply transform scale in order make camera full screen.

let screensize = uiscreen.mainscreen().bounds.size let aspectratio:cgfloat = 4/3 let scale = screensize.height/screensize.width * aspectratio self.imagepikerviewcontroller.cameraviewtransform = cgaffinetransformmakescale(scale, scale); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -