UIGraphicsBeginImageContext(self.frame.size);

[self.layerrenderInContext:UIGraphicsGetCurrentContext()];

iv.image = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();