2011-07-18 3 views
0

블록 애니메이션을 사용하여 페이드 아웃하고, 텍스트를 변경 한 다음 한 번에 하나씩 사라지도록하여 3 개의 UILabels (display1, display2, display3)에 교차 디졸브를 시도하고 있습니다. 내가 사용하는 코드는 다음과 같습니다 4.3의 대상을 빌드animateWithDuration이 인식되지 않습니까?

Method '+animateWithDuration:delay:animations:completion:' not found* 

'UIView' may not respond to method '+animateWithDuration:delay:animations:completion:' 

내가 엑스 코드 4.0을 사용하고 아이폰 OS와 : 나는 다음과 같은 경고를 얻을

[UIView animateWithDuration:1.0 delay: 1.0 
    animations:^{ 
     display1.alpha = 0.0; 
     display2.alpha = 0.0; 
     display3.alpha = 0.0; 
    } 
    completion:^{ 
     [display1 setText:[NSString stringWithFormat:@"%@",[engine getstring]]]; 
     [display2 setText:[NSString stringWithFormat:@"%@",[engine getstring]]]; 
     [display3 setText:[NSString stringWithFormat:@"%@",[engine getstring]]]; 
     [UIView animateWithDuration:1.0 delay:1.0 
      animations:^{ 
       display1.alpha = 1.0; 
       [UIView animateWithDuration:1.0 delay:1.0 
        animations:^{ 
         display2.alpha = 1.0; 
         [UIView animateWithDuration:1.0 
          delay:1.0 
          animations:^{ 
           display3.alpha = 1.0; 
          } completion:nil]; 
        } completion:nil]; 
     } completion:nil]; 
    }]; 

.

답변

1

는 대신

+ animateWithDuration:delay:options:animations:completion: 

를 사용하고 싶습니다. 중간에 options:에 유의하십시오.

+0

감사합니다. 당신은 절대적으로 옳습니다. 뚱뚱한 손가락 순간, 그리고 거기에 없었던 것을 보지 마라! –

+0

@ 존 : 다행히 정리 해줘서 다행입니다. 이 방법이 효과가 있으면 작은 체크 표시를 클릭하여 정답으로 "수락"하십시오. 앱과 관련된 행운을 빈다. – PengOne

관련 문제