UIGraphicsBeginImageContextWithOptions(self.imgView.bounds.size, YES, [UIScreen mainScreen].scale);
[self.imgView drawViewHierarchyInRect:self.imgView.bounds afterScreenUpdates:YES];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();