NSLog not executing


#1

takePicture method implementation

[code]- (IBAction)takePicture:(id)sender {
NSLog(@“Camera button tapped”);
UIImagePickerController *imagePicker= [[UIImagePickerController alloc] init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
NSLog(@“Yes. The Camera is available”);
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];

}
else{
    NSLog(@"The Camera isn't available. Try thru the Photo Library");
    [imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]
    ;
}
imagePicker.allowsEditing=YES;
[imagePicker setDelegate:self];

NSLog(@"Presenting Modal Controller");
[self presentViewController:imagePicker animated:YES completion:NULL];

}
[/code]
In the above scenario, when the method is called (that is when i tap the camera bar button item),the console does not log Camera button tapped message as well as Presenting Modal Controller message.All the other appropriate NSLog messages are being logged as they should be. I don’t understand how come the runtime not execute these NSLog lines.
There’s a similar problem in -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info that i face. Here’s the implementation—

[code]-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
NSLog(@“imagePicker called”);
NSString *oldKey= _item.imageKey;
if (oldKey) {
NSLog(@“Deleting image having key- %@”,oldKey);
[[BNRImageStore sharedStore] deleteImageForKey:oldKey];
}

UIImage *image= [info objectForKey:UIImagePickerControllerEditedImage];

CFUUIDRef newUniqueID= CFUUIDCreate(kCFAllocatorDefault);
CFStringRef newUniqueIDString= CFUUIDCreateString(kCFAllocatorDefault, newUniqueID);

//Use that uniqueID to set our item's imageKey
NSString *key= (__bridge NSString *)newUniqueIDString;
_item.imageKey=key;

//Store image in the BNRImageStore with this key
NSLog(@"putting %@ in dictionary table",_item.imageKey);
[[BNRImageStore sharedStore] setImage:image forKey:_item.imageKey];

//Releasing Core-Foundation objects
CFRelease(newUniqueIDString);
CFRelease(newUniqueID);

[imageView setImage:image];
 NSLog(@"Dismissing Modal Controller");
[self dismissViewControllerAnimated:YES completion:NULL];

}
[/code]
Here. the NSLog messages— imagePicker called and in the third last line— Dismissing Modal Controller are not showing up in the console. Again the runtime doesnt process these NSLog lines.
:confused:
Am i assuming something wrong.??? Coz this behavior is so very weird…What’s happening??? :confused: :confused: