how to dismiss action sheet

后端 未结 3 984
甜味超标
甜味超标 2021-01-17 13:42

i used this code to show uipicker in uiactionsheet but when i click close button i want to remove action sheet from view. so what should be the code for removing actionSheet

3条回答
  •  太阳男子
    2021-01-17 13:56

    Adding this method worked for me:

        -(void) dismissActionSheet:(id)sender {
            UIActionSheet *actionSheet =  (UIActionSheet *)[(UIView *)sender superview];
            [actionSheet dismissWithClickedButtonIndex:0 animated:YES];
        }
    

提交回复
热议问题