我已经UIViews
通过添加图像来自定义它,使其看起来像单选按钮或复选框,但是对于我的规范,我想让它UIAlertView
看起来像这样......
谁能建议如何做到这一点?谢谢!
我已经UIViews
通过添加图像来自定义它,使其看起来像单选按钮或复选框,但是对于我的规范,我想让它UIAlertView
看起来像这样......
谁能建议如何做到这一点?谢谢!
您可以设计自定义视图,并可以使用此代码为其提供动画作为警报视图
-(void)initialDelayEnded
{
alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
alert_upload.alpha = 1.0;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1/1.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)];
alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
[UIView commitAnimations];
}
- (void)bounce1AnimationStopped {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.5/2];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)];
alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);
[UIView commitAnimations];
}
- (void)bounce2AnimationStopped {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.5/2];
alert_upload.transform = CGAffineTransformIdentity;
[UIView commitAnimations];
}
alert_upload 是 UIView。
您可以创建自己的自定义警报视图,除非用户交互,否则 Apple 不会拒绝它。