<UIActionSheetDelegate>

UIActionSheet *actionSheet = [[UIActionSheet alloc]
           initWithTitle:@"Are you sure?"
           delegate:nil
           cancelButtonTitle:@"No Way"
           destructiveButtonTitle:@"Yes, I'm Sure!"
           otherButtonTitles:nil];
  [actionSheet showInView:m_ClistView->getView()];
  [actionSheet release];

//委托方法

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
   
    switch (buttonIndex)
    {
        case 0: //cancelButtonClick
        {
            [self doSomething];
            break;
        }       
        case 1: //otherButtonClick
        {
            [self doSomething1];
            break;
        }  

            default:            break;    }}

posted on 2010-01-20 09:24  mac Arthur  阅读(557)  评论(0编辑  收藏  举报