答案 0 :(得分:3)
使用视频标记上的“poster”属性。
例如:
switch (RandomNumber) {
case 1:
Question.text = "What greeting would you use in the morning"
//Logic goes here
NSMutableArray *arrAnswers=[[NSMutableArray alloc]
initWithObjects:@"Hello",@"Goodbye",@"Good Morning",@"See you soon",@"Ni Hao",@"CTA",nil];
NSMutableArray *buttons = [NSMutableArray arrayWithObjects: Answer1,Answer2,Answer3,Answer4,Answer5,Answer6, nil];
for (UIButton *btn in buttons) {
int randomIndex= arc4random() % [arrAnswers count];
NSString* btnTitle = [arrAnswers objectAtIndex:randomIndex];
[btn setTitle:btnTitle forState:UIControlStateNormal];
[arrAnswers removeObjectAtIndex:randomIndex];
}
//End of Logic
CorrectAnswer = "1"
break
如果您没有为海报属性指定值,则播放器将使用源视频的第一帧作为海报。