如何创建视图控制器以显示应用程序的“积分”。我正在考虑表格视图,但我不知道如何像他们在电影结尾显示的那样对其进行动画处理。
问问题
362 次
1 回答
-1
你可以为 UILabel 制作动画,把你的功劳放在这里。将坐标设置为在底部离开屏幕,然后在顶部设置动画以离开屏幕。
UILabel *credits = [[UILabel alloc] init];
credits.text=@"your text here, it's easier to do this in the interface builder though so you can add new lines";
credits.center=CGPointMake(someX, someYOffTheScreen);
[self.view addSubview:credits];
[UIView animateWithDuration:10 delay:0 options:0 animations:^{
//make the frame somewhere off the screen
credits.center=CGPointMake(someX, someYOffTheScreenOppositeEnd);
} completion:^(BOOL finished){
[credits removeFromSuperview];
}];
学分是UILabel
于 2015-02-08T14:20:47.153 回答