objective c - UIImageView not displaying image - iPhone SDK -


I am using AVFRMMwork to capture camera frames and I would like to process and display them in UIImageView, but there is some problem. I have a code:

A sample buffer was written when it is said that the delegate - (zero) CaptureOptput: (AVCaptureOutput *) CaptureApptput didOutputSampleBuffer: (CMSampleBufferRef) connection to the sampleBuffer: (AVCaptureConnection *) Connection {// NSLog (@ "Capturing \ n"); // Create a UIImage from sample buffer data UIImage * Image = [Self Image Entertainment Buffer: sampleBuffer]; NSLog (@ "Image:% F% F \ n", Image. Size.height, image.size.width); [ImageView Set Image: Image]; }

However, it will not be displayed. The correct size is shown in NSLog , and when I enter:

imageImage: [UIImage imageNamed: @ "SomethingElse.png"]];

In the viewDidLoad, an image is displayed correctly (so I know that UIImageView is correctly added).

Should not any work? I'm at a loss right now.

Cheers, Brett

What are you doing on this main thread? You can either use the main queue for the representative (undesirable, because you are already processing) or:

  dispatch_async (dispatch_get_main_queue (), ^ {imageView.image = .. ;;});  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -