如何设计学分页面

时间:2015-02-08 11:21:32

标签: ios credits

如何创建视图控制器以显示应用的“积分”。我正在考虑桌面视图,但我不知道如何动画它就像他们在电影结束时显示的那样。

1 个答案:

答案 0 :(得分:-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];

    }];

其中credit是UILabel