If there is a black bar at the bottom of the screen(like in the pic that i've pasted below), we have to re-scale the live screen camera overlay to fit the aspect ratio of iPhone. And even if I change the Y value from 1 to 1.234(for iPhone 4), it will fill up the bottom black area and the entire view will be covered by the live screen camera. So far it looks fine. But I want to keep the bottom black area as it is and want to reduce the size of the live screen camera only from the top margin, so that there are two black areas of equal sizes both at the top and at the bottom of the screen.
So in this piece of code, if i try to change the value of CAMERA_TRANSFORM_Y from 1.234 to 0.8,
#define CAMERA_TRANSFORM_X 1
#define CAMERA_TRANSFORM_Y 1.234
self.picker.cameraViewTransform = CGAffineTransformScale(self.picker.cameraViewTransform, CAMERA_TRANSFORM_X, CAMERA_TRANSFORM_Y);
the size of the live screen camera reduces both from the top and from the bottom margin, creating a larger black area at the bottom, but a smaller black area at the top(like in this pic),
Hence, I want the two black areas to be of equal size both at the top and at the bottom, inorder to align the live screen camera at the center of the view. Can anyone tell me how to get this done? This is my project file(click on done button to open up the live screen camera in my project),