UIAlertView代表 [英] UIAlertView Delegates

查看:125
本文介绍了UIAlertView代表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释委托给 UIAlertView 的工作原理吗?是自动调用还是我必须调用它?例如:

Can someone explain how the delegate to a UIAlertView works? Is it automatically called or do I have to call it? Eg:

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

推荐答案

只要你正确设置UIAlertView的委托属性并实现协议,当用户点击在警报中的按钮上。

So long as you're correctly setting the delegate property of the UIAlertView and implementing the protocol, it will be automatically called when a user clicks on a button in your alert.

请参阅http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIAlertViewDelegate_Protocol/UIAlertViewDelegate/UIAlertViewDelegate.html 查看动作。

这篇关于UIAlertView代表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆