ios7 - Fullscreen camera in iPhone 5s -
i create camera overlay custom view , m trying have camera in fullscreen applying scale , translation. work great in iphone 5 doesn't in iphone 5s. try many portions of codes still not found problem. code :
if ([[uiscreen mainscreen] bounds].size.height == 568) { cgaffinetransform translate = cgaffinetransformmaketranslation(0.0, 71.0); cgaffinetransform scale = cgaffinetransformscale(translate, 1.333333, 1.333333); imagepicker.cameraviewtransform = scale; }
by way tests in ios 7.
thank's help.
put line of code in custom camera oveylay class. works me in iphone5s.
cgsize screensize = [[uiscreen mainscreen] bounds].size; int heightoffset = 120; float cameraaspectratio = 4.0 / 3.0; //! note: 4.0 , 4.0 works float imagewidth = floorf(screensize.width * cameraaspectratio); float scale = ceilf(((screensize.height + heightoffset) / imagewidth) * 10.0) / 10.0; self.imagepickercontroller.cameraviewtransform = cgaffinetransformmakescale(scale, scale);
Comments
Post a Comment