当Mac内核恐慌时,有动画,它不像幻灯片动画,如何在iPhone中实现这个动画,是否存在这样做的API?
答案 0 :(得分:5)
没有API,但它是相当简单的动画:
只需创建一个UIView
并为其frame
设置动画,从0高度变为全高:
// Create your view
UIView *kPview = [[UIView alloc] init];
// Add it to your view
[self.view addSubView:kPview]
// Set its frame
kPview.frame = CGRectMake(0,0,320,0);
//Set the animation
[UIView animateWithDuration:5
animations:^{
kPview.frame = CGRectMake(0,0,320,460);
}
completion:^(BOOL finished){
//add a UILabel with the warning.
}];