UIPopoverController, backgroundColor = clearColor - iphone

I had a UITableView that I replaced with a UIPopoverController. My UITableView's background was set to clearColor and it showed the custom background through the table. The table cells also matched the grey tint of my background image.
Now when I use the UIPopovercontroller, with the background set to clearColor, I can see through my UIPopoverController, but the color is the "standard" popover controller color. The kind of grey/blue tint. Is there a way to change that? Thanks.

Related

UITableViewCell are transparent when UITableView is transparent

I have a TableView as a subview of an UIViewController, presented modally. The TableView has a clear background. When I set the cells background to white, cells appears transparent but when color is set to Red everything is ok.
What's going on ?

Changing background color of a section in UITableView

Is it possible to set the background color of a section of a UITableView.
I want to set the background color of one section to "UIColor clearColor".
When I did, its showing the transparent section with border. How can I prevent the border.
You need to set separatorStyle property of your UITableView to UITableViewCellSeparatorStyleNone and draw borders inside your cells. Add and position 1px UIView and hide it when you don't need the border to be shown.

unused cells background color

I have a UITableView which displays about 5 cells at a time, yet in my table there might be cases where there are only 2 cells with content as seen on this picture:
alt text http://www.freeimagehosting.net/uploads/30d3602979.png
The white cells below do not look nice, how can I change the background color of these cells to black too? UITableView does not have a backgroundColor property.
Thanks!
A UITableView inherits from UIView, and UIView always has a backgroundColor.
You can also change the background color to "non-opaque", and then change the background color of your parent container.
tableView.backgroundColor = // some UIColor

Black corners on UITableView Group Style

I have a problem where my UITableView (group style) has a black "tip" above it's rounded corner.
I'm setting up the background of the tableview like so:
[meetingTableView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[[UIImage alloc] initWithContentsOfFile:#"background.png"]]];
And my table view ends up looking like this:
black pointy edge on rounded corner http://papernapkin.org/pastebin/resource/images/imageEntryId/6487
Any ideas how I can get rid of those black points?
I have got the same problem.
When I set clear color by xib, I have the back corner
The solution is to set it by code !
(The same problem with interface builder exist for webviews)
Try this in your controller's viewDidLoad method:
meetingTableView.backgroundColor = [UIColor clearColor];
You'll get Black corners on UITableView Group Style if you set background color to clear color in XIB.
Instead try this code for removing Black corners on UITableView Group Style
tableViewObject.backgroundColor=[UIColor clearColor];
Just in case you weren't already aware, there's another neat technique you can use to make customized backgrounds for UITableViews:
Not quite as simple as setting the background as you're doing, but it gives you a lot more flexibility and can scale to any table size.
Maybe if you put yourTableViewOutlet.backgroundView=nil;
To avoid the black corners you have to make sure that the UITableViewCells are not opaque. It looks like you're using custom styles table cells and the default value for opaque is YES. Either go to Interface Builder and uncheck the opaque checkbox if the table cell was set up in a XIB file. Or use the setOpaque:NO setter to change value.
Because the table cell view still has a rectangular frame even with the rounded corners the cell view and not the actual table view is causing those black corners.
My guess is that it's related to something that you're doing in your custom table view cells. You might want to experiment with setting the cell background color to [UIColor clearColor].
I think you should set the background color of your table as clearColor and initialsie your view with the background image.
Then it will definitely not show the black corners. But also don't forget to set the background color of your cell as white color
The up-voted answer above (set the tableView's background to [UIColor clearColor]) may not work for you if you are like me and never use the UITableViewController, instead putting a UITableView inside a UIViewController.
In this case it's not the tableView that needs to have a clear background, but the view that holds the tableview.
This is not intuitive, but it works for me. In interface builder you can just set the parent view's background color to clear color, or you could do the same in code in viewDidLoad with:
self.view.backgroundColor = [UIColor clearColor];
I'm guessing the reason for the black corners is something about the internal graphics optimization, and setting the background clear fixes it.

Changing border color in iPhone UITableView cells (non-grouped)

I've read (and used) the code here which illustrates how to change the background color and border color of a UITableViewCell in grouped mode on the iPhone. I'm writing an app now which has a non-grouped UITableView and I need to change the border color of the cells. I know that I can modify the code and create a new background view and apply it, but is it necessary?
Is there an easy way to specify the border color of a UITableViewCell if it is a non-grouped style?
If by "border color" in a plain table view you mean the separator lines between the cells (default color gray), you can customize this color for the whole table view via:
tableView.separatorColor = [UIColor blueColor];
See the UITableView reference.