0
도와주세요! 이미지를 하나씩 변경하려면 뒤로, 이전 버튼이있는 슬라이드 쇼와 같은 앱을 만듭니다. 그러나 큰 이미지를 사용할 때 충돌이 발생합니다. 이제 64 jpg 사진, 크기 ~ 20kb/1pic을 사용하고 있습니다.UIImageView를 사용하여 iPhone의 사진 갤러리와 같은 앱 만들기
나를 도와주세요! 코드처럼 (U는 닉 hoangtuanfithou를하시기 바랍니다 추가 할 수 있습니다) :
// 초기화 이미지 배열
-(void)InitImageArray1
{
myAnimationImages1 = [[NSMutableArray alloc] init];
for (int i = 0; i < 24; i++)
{
NSAutoreleasePool *poolArray=[[NSAutoreleasePool alloc] init];
NSString *fileName = [NSString stringWithFormat:@"001 (%d)",i];
image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:fileName ofType:@”jpg”]];
[myAnimationImages1 addObject:image];
[poolArray release];
}
}
// 이미지 변경 self.mainImage.image = [self.myAnimationImages1 objectAtIndex : animationImageArrIndex]