//截屏
- (UIImage*)snapshot:(UIView*)eaglview{
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 0.0);
// Render our snapshot into the image context
[eaglview drawViewHierarchyInRect:self.view.bounds afterScreenUpdates:NO];
// Grab the image from the context
UIImage *complexViewImage = UIGraphicsGetImageFromCurrentImageContext();
// Finish using the context
UIGraphicsEndImageContext();
return complexViewImage;
}