我通过添加图片来定制UIViews
,使其看起来像单选按钮或复选框,但对于我的规范,我想让UIAlertView
看起来像这样......
有人可以建议怎么做吗? 谢谢!
答案 0 :(得分:1)
您可以设计自定义视图,并可以使用此代码将动画作为警报视图提供给
-(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。
答案 1 :(得分:0)
有many previous questions about this topic,其中一个链接this component可让您创建自定义提醒和操作表。可能是一个很好的开始方式。
答案 2 :(得分:-1)
您可以创建自己的自定义提醒视图,除非用户互动,否则Apple不会拒绝它。