tags:

views:

152

answers:

2

Hello all,

I am using the following way to set the background of the UITableView.

self.tableView.backgroundColor = [UIColor clearColor];

self.parentViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageWithData:imageData]];

The image which I want to set as the background is light gray color But the image which I see is totally white.

What is the problem. Like is it with the colorWithPatterImage or with the UITable.

A: 

This link was helpful...

http://stackoverflow.com/questions/477325/uitableview-background-image-alpha-problems

setting the opaque property to NO solved the problem but I want to know why was this problem occurred.

rkb
A: 

If you kust want to set some custom color as a background, you can use

[UIColor colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha]
Morion
No I want to set an image.
rkb