Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-17-2010, 09:55 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 1
Default How to display a photo taken with the camera inside a UINavigationController?

Hi,

basically I'm trying to get a photo from the iPhone camera and display it in a UIImageView. This works perfectly fine as long the class myViewController is displayed as a standalone view. If I'm putting the View inside a UINavigationController the UIImageView won't display the image after taking one with the camera. But if I choose a picture from the library everything is fine again.

So why does the UIImageView won't display a image taken with the camera inside a UINavigationController?

This is my code so far:

Code:
/* class: myViewController
@interface myViewController: UIViewController
       <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
*/
- (IBAction) getPicture {
    UIImagePickerController * picker = [[UIImagePickerController alloc] init];
       picker.delegate = self;
       picker.sourceType = UIImagePickerControllerSourceTypeCamera;
       [self presentModalViewController:picker animated:YES];
}

- (void) imagePickerController:(UIImagePickerController *)thePicker 
                    didFinishPickingMediaWithInfo:(NSDictionary *)imageInfo
{
    [thePicker dismissModalViewControllerAnimated:YES];
       UIImage *img = [imageInfo
                       objectForKey:@"UIImagePickerControllerOriginalImage"];
    self.myImageView.image = img;
}
I would appreciate any help on that strange problem.
_dan_ is offline   Reply With Quote
Reply

Bookmarks

Tags
camera, uiimageview, uinavigationcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 272
22 members and 250 guests
ADY, Bertrand21, Dani77, fkmtc, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, mer10, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:02 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0