修改UIAlertView背景

UIGraphicsBeginImageContext(theSize);    
    [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];    
    theImage = UIGraphicsGetImageFromCurrentImageContext();    
    UIGraphicsEndImageContext();
    theAlert.layer.contents = (id)[theImage CGImage];
 
 
 
  UIImageView * image = [theAlert valueForKey:@"_backgroundImageView"];
    image.image = [UIImage imageNamed:@"loveChina.png"];

posted on 2012-11-15 17:55  无量少年  阅读(144)  评论(0编辑  收藏  举报

导航