Joethemonkey101
Joethemonkey101

Reputation: 45

Automatically Taking a Screenshot?

I'm developing using the cocos2d framework, Obj-C. I have a whole method for taking a screenshot called "screenshot". I'd like to know how I can take a screenshot. I've been told to just call [self screenshot]; but I get the warning 'GameOver' (class) may not respond to '-screenshot'. The screenshot method is in the AppDelegate.

Any help is appreciated!

Upvotes: 0

Views: 441

Answers (1)

Jesse Anderson
Jesse Anderson

Reputation: 4603

Include the header for the application delegate and call.

[[[UIApplication sharedApplication] delegate] screenshot]

Upvotes: 1

Related Questions