Month: August 2011

Getting a Screencapture of UIView

Posted on Updated on

Some times you have to capture a portion of you iPhone application programmatically;
The quickest way is to pass the target view to following method and get its screenshot as an UIImage;

-(UIImage*)captureFullScreen:(UIView*) targetView{
    UIGraphicsBeginImageContext(targetView.view.frame.size);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *fullScreenshot = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(fullScreenshot, nil, nil, nil);
    return fullScreenshot;
}

Read the rest of this entry »

Advertisements

Feham-ul-Quran :: Book Review;

Posted on Updated on

Among many other books those I had from annual book fair at Punjab university this year, the title of this book really catched my attention; It claims to teach translation of Quran with some common symbols and selective verses from different chapters;

Read the rest of this entry »