我想从后台服务截屏。私有(private)API很好,因为我不需要提交到应用商店。我已经尝试过UIGetScreenImage,它在后台应用程序中不起作用。我正在使用从SO获得的以下代码。IOSurfaceCreate返回null给我。任何帮助表示赞赏。CFMutableDictionaryRefdict;IOSurfaceRefscreenSurface=NULL;charpixelFormat[4]={'A','R','G','B'};dict=CFDictionaryCreateMutable(kCFAllocatorDefault,0,&kCFTypeDictionaryKey