`
cenphoenix
  • 浏览: 160531 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

tell user the status

 
阅读更多
+(UIView *)waitingView
{
    CGRect frame = CGRectMake(90, 190, 32, 32);
    UIActivityIndicatorView* progressInd = [[UIActivityIndicatorView alloc] initWithFrame:frame];
    [progressInd startAnimating];
    progressInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
 
    frame = CGRectMake(130, 193, 140, 30);
    UILabel *waitingLable = [[UILabel alloc] initWithFrame:frame];
    waitingLable.text = @"Processing...";
    waitingLable.textColor = [UIColor whiteColor];
    waitingLable.font = [UIFont systemFontOfSize:20];;
    waitingLable.backgroundColor = [UIColor clearColor];
 
    frame = [[UIScreen mainScreen] applicationFrame];
    UIView *theView = [[UIView alloc] initWithFrame:frame];
    theView.backgroundColor = [UIColor blackColor];
    theView.alpha = 0.7;
    [theView addSubview:progressInd];
    [theView addSubview:waitingLable];
 
    [progressInd release];
    [waitingLable release];
 
    return [theView autorelease];
}

 

 

The most basic code is here:
最简单的就是显示一个什么也没有的view,如下
CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小
UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView
theView.backgroundColor = [UIColor blackColor];//设置其背景色为黑色
theView.alpha = 0.7;//设置其透明为0.7

然后想办法显示这个theView即可,比如
[[[UIApplication sharedApplication] keyWindow] addSubview:theView]

  • 大小: 28.6 KB
分享到:
评论

相关推荐

    计算机网络第六版答案

    First, the content provider has more control over the user experience, since it has to use few intermediary ISPs. Second, it can save money by sending less traffic into provider networks. Third, if ...

    2009 达内Unix学习笔记

    cd /user/s0807 从绝对路径去到某目录。 cd ~/s0807 直接进入主目录下的某目录(“cd ~"相当于主目录的路径的简写)。 ls 显示当前目录的所有目录和文件。 用法 ls [-aAbcCdeEfFghHilLmnopqrRstux1@] [file...] ls...

    vb写的ole 回调函数

    'find the status of a server. Although this demo simply returns the time 'to the client, it could just as easily return data, news, or other information 'it has been told the client wants to know. The...

    Git-2.21.0-64-bit.zip

    give the user a chance to edit the log message, even when there is otherwise no need to create a new merge and replace the existing one (i.e. fast-forward instead), but did not. Which has been ...

    google api php client

    1. Tell the Google client to use your service account credentials to authenticate: ```php $client = new Google_Client(); $client->useApplicationDefaultCredentials(); ``` 1. Set the scopes ...

    webwizforums 7.7 SQL 版

    added_member.asp - new file to tell the user the new member has been added 39. functions_send_mail.asp - changed outputted text for emails 40. default.asp - updated some incorrect ...

    Sakemail

    sorry =)- Minor changes to the code.1.0- Developed with WSockets 1.2 POP.Login now return a boolean depending id the user is authorized, and POP.Init return the number of new msgs.1.01- Fixed a bug ...

    ora分析脚本

    return the last hash_value of user sessions - openv <sql_id> []: display optimizer env parameters for specified cursor - plan <sql_id> []: get explain plan of a particular cursor - pxplan ...

    VB编程资源大全(英文源码 API)

    docudel.zip This example shows how to clear the document history on the start menu.<END><br>2 , BatteryAPIdemo.zip This example demonstrates how to "To get information about the battery status ...

    VB编程资源大全(英文源码 网络)

    So 下载 the code and get involved with the News Group, help us to help you.<END><br>4 , urllink.zip User control to launch web browser and jump to URL.<END><br>5 , vbftp.zip Sample application ...

    php.ini-development

    The following are all the settings which are different in either the production ; or development versions of the INIs with respect to PHP's default behavior. ; Please see the actual settings later in...

    Practical Mod Perl

    Handling the "User Pressed Stop Button" Case Section 6.10. Handling Server Timeout Cases and Working with $SIG{ALRM} Section 6.11. Generating Correct ...

    mysql事务与锁机制(存储引擎和锁、MyISAM锁机制、InnoDB锁机制、Next-Key锁、Dead-Lock).docx

    - 再次插入数据:`INSERT INTO dc_user (user_name,tell_phone) VALUES ('lock01','13267788998');`(成功) **排它写锁验证**: - **会话一**: - 加写锁:`LOCK TABLE dc_user WRITE;` - 插入数据:`INSERT ...

Global site tag (gtag.js) - Google Analytics