views:

60

answers:

1

i get image from uiimagepickerviewcontroller and set it in global file but when i try to retrieve it from global it will not display in uiimageview

following is code of delegate method form which i get image

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{

    UIImage *tempimg = image; 
    [Global setimage:tempimg];
    isphototeken = TRUE;
    [picker dismissModalViewControllerAnimated:NO];
    [tblsubmenu reloadData];
    NSLog(@"global image %@",[Global getimage]);
    [picker release];

}

error at display time

bad exception application is terminate

A: 

I think the problem is with this line.

NSLog(@"global image %@",[Global getimage]);

giving image to the log??? you just try to comment out this line and run and check whether the application runs or not

Nithin
there's nothing wrong with this log statement
Ben Gottlieb
but i get image here and i pass this image to my next controller so at that i place write this code imgproducttoupload.image = [Global getimage]; imgproducttoupload is uiimageview in next controller where i show imagehere i found bad exception
priyanka
how and where are you declaring the variable 'Global'???
Nithin