how to dismiss action sheet

后端 未结 3 986
甜味超标
甜味超标 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];
        }
    
    0 讨论(0)
  • 2021-01-17 13:59

    All you need to do is dismiss the ActionSheet, which you could do with dismissWithClickedButtonIndex:animated:

    0 讨论(0)
  • 2021-01-17 14:03

    action sheet scope problem.

    used [actionSheet dismissWithClickedButtonIndex:0 animated:YES];

    0 讨论(0)
提交回复
热议问题