首页 新闻 会员 周边

UIAlertView 为什么不遵循协议也能执行方法?

0
[已关闭问题] 关闭于 2015-10-15 23:21

 1 @interface LoginViewController : UIViewController  

//UIButton 委托方法
1 - (void)loginAction:(UIButton *)sender{
2     UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"提示" message:@"登录成功" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:@"取消", nil];
3     [alertView show];
4 }
5 
6 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
7     NSLog(@"adgsvjdsfbdf");
8 }

可以执行,不警告,也不报错

D.Angelo的主页 D.Angelo | 菜鸟二级 | 园豆:216
提问于:2015-10-14 23:15
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册