user331914
user331914

Reputation:

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); 
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];

    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
}

Upvotes: 0

Views: 424

Answers (1)

user121301
user121301

Reputation:

Have you tried this?

- (void) save;

Upvotes: 2

Related Questions