Dillion / iOS-Flip-Transform

Core Animation framework for navigating data by flipping
919 stars 155 forks source link

I want to Add 6 image in one flipview how i can please #1

Closed oasis1996 closed 12 years ago

oasis1996 commented 12 years ago

i want to add my 6 image in one flipview you can help me

example http://cdn.flipboard.com/dev_O/insideflipboard/iphonetips/TipsBlog_GearReadIt2.png

please help me!!!!!!

Dillion commented 12 years ago

Hi,

You can take a screenshot of the 6 images by specifying the screen portion:

UIGraphicsBeginImageContext(CGSizeMake(widthWithLeftMargin, heightWithTopMargin));
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
CGImageRef imageRef = CGImageCreateWithImageInRect([screenshot CGImage], CGRectMake(leftMargin, topMargin, screenshotWidth, screenshotHeight));

UIGraphicsEndImageContext();

UIImage *screenshotAfterCrop = [UIImage imageWithCGImage:imageRef]; // pass this image to flipview
CFRelease(imageRef);