Declare in .h file? iPhone SDK
How would I declare this code in the header file (.h) in iPhone SDK?
- (void) save {
UIGraphicsBeginImageContext(self.view.frame.size);
开发者_StackOverflow社区 [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
}
Have you tried this?
- (void) save;
精彩评论