iOS Table view cells with transparent background - ios

is it possible to make a table look like messages on iPhone. So that maybe each message is a table section with an image of a bubble and on top of that bubble is a label with the message text. Can a table cell be entirely transparent so that only the bubble image is displayed without the white cell, and the border?
Thanks

Have a look at this :
UIBubbleTableView
If you want the growing textView where you type the message, this is the one :
HPGrowingTextView

When you create your cell you can make the background transparant:
cell.contentView.backgroundColor = [UIColor clearColor];
You can simply add an imageView as backgroundView.

Related

How to set UITableView background for blank space?

I attempted to use UITableView (with static content) to create a setting screen similar to the iPhone's system setting screen. It mostly works excepts the blank space under the last row are filled with white row cells instead of background color, as shown in this screenshot:
I have tried various ways to fix this: setting the table view's background, add an empty row as the last row with the background color. What should be the right fix?
Objective-C
[[UITableView alloc] initWithStyle: UITableViewStyleGrouped]
Swift 2
UITableView(style: .Grouped)
Swift 3
UITableView(style: .grouped)
You should also be able to set the table view style in the interface builder.
You need:
tableView.tableFooterView = UIView()
How to remove empty cells in UITableView?
Eliminate extra separators below UITableView
Go to View Section of the TableView's Attributes Inspector and set the background color there. It will work

spacing between cells io9.2 objective C

I want to create spacing between table view cells like this:
I have 1 section and a dynamic number of rows per section for my tableview. So far I have set my content view to clear like this in my tableView:cellForRowAtIndexPath: method:
cell.contentView.backgroundColor = [UIColor clearColor];
I have also created a view within my content view, but I'm not sure how to set those values or manipulate the subview so that it appears as though there is spacing. If there's an easier way to create spacing I'm open to those suggestions as well.
Set the group background to clear color and the controller's background to the color you want.
1) Set the tableviews background colour to clear.
2) Set the cells background colour to clear as well.
3) Add a view(suppose "myView") with the background colour you need on top of the cell such that the height of the view is less than the rows height (e.g. myView.height = 90 and row height is 100).
4) Add the rest of your views as subviews of myView.
You will achieve your desired result.

Clear header and White background for UICollectionView

I have been looking all over the web for this issue, but I have not been able to find anything helpful. Any help or direction will be highly appreciated.
I have a UICollectionView with a header (that contains simple text/title) and then a grid. What I want is to have the header background as clear and rest of the area below header should have white background.
Cell background will not work because the actual space that is required to be white is the visible area on top, left, bottom and right of the cells.
Thanking in advance for your help.
EDIT: You can think of it as a UICollectionView is added as a subview to another UIView. The headerView (UICollectionReusableView) should have clear background so that we can see the parent UIView. where as the rest of the collectionView (Cell area and space around them) should have white background. It will look like as if the title is floating.
for me I used UICollectionReusableView for my HeaderView of my UICollectionViewController. Setting the background color with
self.backgroundColor = [UIColor clearColor];
did the trick.

What are these UITableView lines in the image?

I have a UITableView on a UIView. This UIView is in a UICollectionViewCell which means that I can do the action you can see in the image. A new UICollectionViewCell is coming on from the right. As a new cell comes onto the visible rect it is slightly resized you can see that the right one is slightly smaller.
While this new cell is "sliding on" the table view has some black lines that show through. It is not the actual separator lines as you can clearly see them, further turning them off or making them the same colour as the cell does not change things.
So can anyone tell me what these black lines are and if I can either directly get rid of them or cover them over somehow.
I believe that the lines are cell separators. You could set the separatorStyle property to UITableViewCellSeparatorStyleNone.
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

Having an empty iOS tableview look (but when filled this changes)?

Hi I am attempting to create a rectangular region (tableView), that when it has no cells will be just a background color. Then when it has cells, the cell background can be different and separators become visible. This idea can be seen in http://itunes.apple.com/us/app/spendings/id473857206?mt=8
in the second screen shot. I can come close by just setting the background color of the table and the cells to different colors, but when there are no cells the table collapses. The screenshot in that link doesn't show this, but when there are no items, it is just an empty rectangle. How can one maintain the dimensions of the table, even when there are no cells?
You can try setting the separator color to clearColor so that the cells aren't visible when they're empty, like:
if([tableView numberOfRowsInSection:0]==0)
{
tableView.separatorColor = [UIColor clearColor];
}

Resources