zoukankan      html  css  js  c++  java
  • [ios]更改控件的背景 【转】

      1. UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"标题"  
      2.                                                         message: @"消息!"  
      3.                                                        delegate:nil   
      4.                                               cancelButtonTitle:@"取消"   
      5.                                               otherButtonTitles:@"确定",nil] autorelease];  
      6. [alert show];  
      7. UIImage *theImage = [UIImage imageNamed:@"loveChina.png"];      
      8.     theImage = [theImage stretchableImageWithLeftCapWidth:0. topCapHeight:0.];  
      9.     CGSize theSize = [theAlert frame].size;  
      10.       
      11.     UIGraphicsBeginImageContext(theSize);      
      12.     [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];      
      13.     theImage = UIGraphicsGetImageFromCurrentImageContext();      
      14.     UIGraphicsEndImageContext();  
      15.     theAlert.layer.contents = (id)[theImage CGImage]; 
  • 相关阅读:
    Nginx使用
    MySQL 分区
    php PDO预处理
    php
    php
    linux 下编译安装MySQL
    php 工厂模式
    MySQL 权限管理
    hadoop集群安装20181016(20111130:前面太忙,没有写完,后面继续)
    JavaScript函数参数翻转——连接多个数组——zip、zipwith
  • 原文地址:https://www.cnblogs.com/jinjiantong/p/2965629.html
Copyright © 2011-2022 走看看