2400x1845 png 이미지를 스크롤보기에로드하고 있습니다. 프로그램이 메모리에서 고장났습니다. 이것을 처리하는 더 좋은 방법이 있습니까? mapScrollView는 IB의 UIScrollView이며 두 개의 UIButton과 함께 있습니다.UIScrollView : 806k 이미지가 너무 많이 처리됩니까? (충돌, 메모리 부족)?
-(void)loadMapWithName:(NSString *)mapName
{
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/path/%@", bundlePath, [maps objectForKey:mapName]]];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
CGSize imgSize = image.size;
mapScrollView.contentSize = imgSize;
[mapScrollView addSubview:imageView];
[imageView release];
[self.view addSubview:mapScrollView];
}
답변 해 주셔서 감사합니다. 이미지를 타일로 나누는 또 다른 방법이 있습니다. 내가 그것을 보았던 곳을 기억할 수 없다. 감사 – Jordan