IOS獲取圖片方法,避免內存過大閃退

建議使用該方法獲取圖片 NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"sun" ofType:@"png"]; UIImage *image = [[UIImage alloc] initWithContentsOfFile:imagePath]; 不要使用下面的方法,圖片過大容易形成內存溢出 UIImage *
相關文章
相關標籤/搜索