UIActionSheet *actionSheet = [[UIActionSheet alloc]

                                      initWithTitle:@"选择来源"

                                      delegate:self

                                      cancelButtonTitle:@"取消"

                                      destructiveButtonTitle:nil

                                      otherButtonTitles:@"从照片库选择",@"从相机选择",nil];


    [actionSheet setDelegate:self];

    [actionSheet showInView:[UIApplication sharedApplication].keyWindow];

//        [actionSheet showInView:self.view];有tabbar最后一个按钮就不灵了

        [actionSheet release];



UIActionSheetDelegate


Logo

智能硬件社区聚焦AI智能硬件技术生态,汇聚嵌入式AI、物联网硬件开发者,打造交流分享平台,同步全国赛事资讯、开展 OPC 核心人才招募,助力技术落地与开发者成长。

更多推荐