Posted By

arpit on 08/04/09


Tagged

UIImage UIColor


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

cgrainger
cnathan


Set background color for a view


 / Published in: Objective C
 

  1. // with an image:
  2. self.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"whiteBackground.png"]];
  3.  
  4. // with a UIColor value
  5. self.backgroundColor = [UIColor redColor]

Report this snippet  

You need to login to post a comment.