PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > 开发编程 > iOS开发教程 > 正文

    缓冲页面

    作者:张志勇来源:原创浏览:时间:2020-09-30 00:07:50我要评论
    导读:拉一个类MBProgressHUD.h和.MBProgressHUD.m//初始化进度框,置于当前的View当中 HUD = [[MBProgressHUD alloc] initWithView:self....
    拉一个类MBProgressHUD.h和.MBProgressHUD.m

    //初始化进度框,置于当前的View当中

        HUD = [[MBProgressHUD alloc] initWithView:self.view];

        [self.view addSubview:HUD];

        

        //如果设置此属性则当前的view置于后台

        HUD.dimBackground = YES;

        

        //设置对话框文字

        HUD.labelText = @"数据同步...";

        

        //显示对话框

        [HUD showAnimated:YES whileExecutingBlock:^{

            [self syncAllTable];

            //对话框显示时需要执行的操作

           // sleep(3);

        } completionBlock:^{

            //操作执行完后取消对话框

            [HUD removeFromSuperview];

            HUD = nil;

            [self alertView:@"数据已同步"];

     

        }];

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-155-6009-1.html
    相关热词搜索:
    上一篇:调用webservice
    下一篇:下拉菜单动画