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];
posted @ 2012-02-14 17:36  凡娃软件  阅读(517)  评论(0编辑  收藏  举报