tags:

views:

18

answers:

0

Hello All,

I am getting Signal '0' and app crash due to line

[iView.layer renderInContext:UIGraphicsGetCurrentContext()];

I am working iPod 4th Gen with OS 4.1

 -(UIImage*) GetFrontViewImage
    {
        UIImage* imgcopy = nil;
        ImageBufferView* iView = [[ImageBufferView alloc] initWithFrontScreenImageFrame:[self GetSavedImage] TemplateId:(NSInteger) iTemplateId];
        CGSize pageSize = iView.frame.size; // tried with 320 * 480
        UIGraphicsBeginImageContext(pageSize);
        [iView.layer renderInContext:UIGraphicsGetCurrentContext()];
        imgcopy = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

        [iView release];
        iView = nil;
        return imgcopy;
    }

Please help on this.

Thanks,

Sagar