当前位置:编程学习 > wap >>

iPhone开发 加载的时候出现一个加载框

先添加一个委托

 _webView.delegate=self;

出现

if (alertView==nil){       

        alertView = [[UIAlertViewalloc] initWithTitle:nil

                                             message: @"正在讀取網路資料"

                                            delegate: self

                                   cancelButtonTitle: nil

                                   otherButtonTitles: nil];

       

        UIActivityIndicatorView *activityView = [[UIActivityIndicatorViewalloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];

        activityView.frame = CGRectMake(120.f, 48.0f, 37.0f, 37.0f);

        [alertView addSubview:activityView];

        [activityView startAnimating];

        [alertView show];

    }

//消失

[myAlert dismissWithClickedButtonIndex:0 animated:YES];


摘自 凡娃软件
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,