UIGraphicsBeginImageContex(imageView.frame.bounds);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* viewImage=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage,nil,nil,nil);