2012-04-05 2 views

답변

1

간단히 레이블을 만들어야합니다. 분명히 CALayer를 사용하면 구현할 수 있지만 간단히 해결할 수는 없습니다.

먼저, moviePlayerView에 레이블을 추가해야합니다.

|     | 
| moviePlayerVew | 
|     | 
|     | 
|[Your Label]  | 

다음 코드를 권장합니다.

자세한 내용은 아래 코드를 참조하십시오. 실행 부 블록을 생성하면서

https://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009530

https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html

플레이어는 간단히 초당 10 회 말하기.

[yourPlayer addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(0.1, NSEC_PER_SEC) queue:queue usingBlock:^(CMTime time) 
{ 
yourLabel.text = @"your string". 
} 
관련 문제