相关头文件: @interface SBScreenShotter : NSObject { BOOL _writingScreenshot; } @property(assign) BOOL writingScreenshot; +(id)sharedInstance; -(void)finishedWritingScreenshot:(id)screenshot didFinishSavingWithError:(id)error context:(void*)context; -(void)saveScreenshot:(BOOL)screenshot; // BOOL 参数决定是否闪光 @end 实验: cy# var screenShotter = [SBScreenShotter sharedInstance ] #"<SBScreenShotter: 0x170c2f480>" cy# [screenShotter saveScreenshot: NO] cy# [screenShotter saveScreenshot: YES] // 上面模拟了 home+电源键的屏幕截图功能
发表评论