我的独立消息应用程序保存的图像如下:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0];
NSString *filePath = [documentsPath stringByAppendingPathComponent:[imageName stringByAppendingString:@".png"]];
PNG 文件被加载到 MSSticker 中,并正确显示在 MSStickerBrowserView 中。当我尝试在对话中放置贴纸时,贴纸会在一秒钟后消失。它适用于资源文件夹中的测试图像:
[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"];
有谁知道这是什么问题?也没有错误消息。
非常简单的答案:保存的图像文件大于允许的大小。缩小后它可以工作