2009-02-01 92 views

回答

3

爲了獲取圖像,你需要使用:

UIGraphicsBeginImageContext(self.bounds.size); 

[theView.layer renderInContext:UIGraphicsGetCurrentContext()]; 
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); 

UIGraphicsEndImageContext(); 

然後,保存到圖片庫:

UIImageWriteToSavedPhotosAlbum(viewImage,nil,NULL,NULL);