Pages

Labels

Thursday, May 17, 2012

How to Change the AlertView backround

       


       UIImage *theImage = [UIImage imageNamed:@"alert.png"];    
       theImage = [theImage stretchableImageWithLeftCapWidth:16 topCapHeight:16];
        CGSize theSize = [deletealert frame].size;
        
        UIGraphicsBeginImageContext(theSize);    
        [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];    
        theImage = UIGraphicsGetImageFromCurrentImageContext();    
        UIGraphicsEndImageContext();
        
        [[deletealert layer] setContents:[theImage CGImage]];
        [deletealert release];
        
        

0 comments:

Post a Comment

 
Loading