IOS获取图片方法,避免内存过大闪退

建议使用该方法获取图片 NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"sun" ofType:@"png"]; UIImage *image = [[UIImage alloc] initWithContentsOfFile:imagePath]; 不要使用下面的方法,图片过大容易形成内存溢出 UIImage *
相关文章
相关标签/搜索