UIAlertView demo

@interface UISettingViewController()

<

    UIAlertViewDelegate

>

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

- (IBAction)appraiseButton:(id)sender {
    
    UIAlertView*alert = [[UIAlertView alloc]initWithTitle:@"评价" 
                                                  message:@"是否跳转到评价页面" 
                                                 delegate:self   
                                        cancelButtonTitle:@"取消" 
                                        otherButtonTitles:@"确定",nil];  
    [alert show];  
    [alert release]; 
}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;{
    
    switch (buttonIndex) {
        case 0:

            break;
        case 1:
            NSLog(@"取消");
            break;
        default:
            break;
    }
}

你可能感兴趣的:(interface)