Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am storing high resolution images in iPhone cache . I am getting Memory warning and the app is crashing.
Please help me how to handle crash ?
您可以缩小图像尺寸并保存。以下方法减小了图像的大小。 NSData *imageData = UIImageJPEGRepresentation(YOUR_IMAGE_OBJECT, 0.0); 第二个参数决定图像的质量和大小。它从 0.0 变为 1.0。 请试试这个