iphone - UIImagePickerController cameraViewTransform acts differently in iOS 4 -


I upgraded both my iPhone and SDK to iOS 4.0.1 and now my app has not run in the same way The way he was running in iOS 3.x

My app uses UIImagePickerController with custom camera overlay (which I will suppress this post). The main point is that I need to look at the iPhone camera in full screen mode. To go straight to the problem, I'll put some code and screenshots to explain what's going on.

I have created a visual-based application using the XCode template project called "CameraTransform", so I found two classes: CameraTransformAppDelegate and CameraTransformViewController , Okay! I have inserted the following code in CameraTransformViewController method:

  - (zero) viewDidAppe: (BOOL) animated {[ : Animated]; UIImagePickerController * Picker = [[UIImagePickerController alloc] init]; Picker.sourceType = UIImagePickerControllerSourceTypeCamera; Picker.delegate = self; // [self configured picture_first: selector]; Use it! // [self configured picture-second: selector]; Use it too! [Self current model visual controller: animated picker: yes]; } - (zero) configurePicker_FirstAttempt: (UIImagePickerController *) picker {picker.showsCameraControls = NO; Picker.navigationBarHidden = Yes; // Not necessarily (use the default) // picture. Tollbar haided = yes; //Picar.Ventils fullscreen layout = yes; } - (Zero) configurePicker_SecondAttempt: (UIImagePickerController *) Picker {// Full Screen Support Conversion Transformers = 1.0 for CGFloat Camera; CGFloat Camera Transform Y = 1.12412; Picker.cameraViewTransform = CGAffineTransformScale (picker.cameraViewTransform, cameraTransformX, Camera Transform U); }  

with this project / i found:

  • Both configurePicker_FirstAttempt and configurePicker_SecondActempt call method Commented:.
  • Only the configurePicker_SecondActempt method commented:.
  • Both configurePicker_FirstAttempt and configurePicker_SecondActempt method notes:
    1. In iOS 3.x I configure the picker The third approach used (both methods), which was shown below in the fullscreen mode without the "black bar"
    2. I rated the picker.cameraViewTransform original value (before being scaled) and it is set to be identifiable).
    3. picker.view.frame is set to screen boundaries (0.0, 0.0, 320.0, 480.0)
    4. I tried to include a translation < Code> picker.cameraViewTransform (after measuring), like this: CGAffineTransformTranslate (Picker.cameraViewTransform, 0.0, 20.0); and I realized that some part of the "camera view" was hidden (maybe this was not 0.0, 0.0), so I got more "see" on the screen "."

    It seems that the UIImagePickerController has changed in some way in the new SDK; there may be different sizes in the camera's control, just like they are.

    Anyone had this problem ?

ios 4.0 magic number 1936/320 = 6.05, 2592 / 6.05 = 428, 480 -428 = 52 52 / (428/2) = 0.24299 + 1 = 1.24299

EOS 3.0 magic number 1536/320 = 4.8 2048 / 4.8 = 427 480-427 = 53 53/427 = 0.121412 + 1 = 1.12412

This relationship camerasportport-screen resolution

Camera View Transform for iOS 3.0 is implemented from above so that you have to use all the height. But in iOS 4 it is applied from the center of the frame so that you have to use half of the height.

and to take you down the frame (52/2) Will Hna.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -