Ios 当用户单击UIAlertView的OK按钮时,移动到另一个视图
当我向用户显示警报时,如果他单击“确定”按钮,我需要将他移动到另一个屏幕,我该如何做:Ios 当用户单击UIAlertView的OK按钮时,移动到另一个视图,ios,uialertview,Ios,Uialertview,当我向用户显示警报时,如果他单击“确定”按钮,我需要将他移动到另一个屏幕,我该如何做: UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"TopStation" message :@"Your internet connection is down, you will be redirected to the previous screen"
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"TopStation"
message :@"Your internet connection is down, you will be redirected to the previous screen"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
您需要做的是在所使用的方法中实现UIAlertView委托 如果你有课的话
@interface MyClass: UIViewController {
您需要将其更改为使用
@interface MyClass:UIViewController <UIAlertViewDelegate> {
从这里您可以继续。您需要做的是在您正在使用的方法中实现UIAlertView委托 如果你有课的话
@interface MyClass: UIViewController {
您需要将其更改为使用
@interface MyClass:UIViewController <UIAlertViewDelegate> {
从这里您可以继续。如何知道“确定”按钮的索引?apple文档仅提供原型默认情况下,“取消”按钮的索引为0如何知道“确定”按钮的索引?apple文档仅提供原型默认情况下,“取消”按钮的索引为0