2010-03-01 5 views
0

아래 코드 외에도 다른 방법으로 애니메이션을 할 수 있습니까? 나는 20-30 프레임까지 얻을 수있는 꽤 강렬한 애니메이션을 가질 것이기 때문에 묻습니다. 각 프레임마다 사운드를 재생할 수 있는지 궁금합니다.다른 방법으로 애니메이션을 할 수 있습니까?

(NSArray *) createAnimationArrayWithFileStem:(NSString *) stem firstFrame:(int) firstFrame lastFrame:(int) lastFrame{ 
    NSMutableArray *animationArray = [[NSMutableArray alloc] init]; 
    for (int currentFrame=firstFrame;currentFrame<=lastFrame;currentFrame++){ 
     [animationArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"%@%d.png",stem,currentFrame]]; 
    } 
    [animationArray addObject:nil]; 
    [animationArray autorelease]; 
    return animationArray; 
} 

또는 매우 그런 일 같은 짧은

popup.animationImages = [NSArray arrayWithObjects: 
           [UIImage imageNamed:@"picture1.png"], 
           [UIImage imageNamed:@"picture2.png"], 
           [UIImage imageNamed:@"picture3.png"], 
           [UIImage imageNamed:@"picture4.png"], 
           [UIImage imageNamed:@"picture5.png"], 
           [UIImage imageNamed:@"picture6.png"], 
           [UIImage imageNamed:@"picture7.png"], nil]; 
     popup.animationDuration = 1.750567; 
     popup.animationRepeatCount = 1; 
     [popup startAnimating]; 
     [self.view addSubview:popup]; 

답변

1

음, 그냥, 그냥 다른 메모를

popup.images = [self createAnimationArrayWithFileStem:@"picture" firstFrame:1 lastFrame:7]; 
+0

할 수있는 포토샵 덤프 매크로 설정을 할 수 것입니다 별도의 레이어에서 프레임을 도출하면 다른면에도 도움이됩니다. 그러나 PS를 사용하지 않았을 수 있습니다. – rougeExciter

+0

전체 질문을 다시 읽으십시오 ... 대리인이 이미지 변경 사항을 알리도록 설정하지 못하는 것 같습니다. 이것은 나를 약간 다른 해결책으로 이끌 것이다. 내가 원하는 경우 (원하는 경우) 원하는 재생 속도로 실행하고 이미지를 통해 순환하는 타이머를 설정할 수 있습니다. 이렇게하면 이미지를 업데이트 할 때 사운드를 재생할 수 있습니다. 그러나 소리가있는 긴 이미지 시퀀스를 재생하고 싶습니까? 그냥 영화를 재생하는 방법 :-) – rougeExciter

+0

어떻게 이미지를 동영상 형식으로 변환합니까? iMovie? – NextRev

관련 문제