Remove separator line of table view cell on storyboard - ios

When I drag and drop a Table View Cell to my UITableView on storyboard, it looks like this:
I would like to remove the separator line, I try to find from attribute inspector to remove separator line:
But I can't find any option for that. Is there a way to remove separator line of a table view cell in storyboard? (I am using xcode 9.1)

Please select the TableView and not the tableView Cell in the storyBoard. The option is there to set the separator style to none there.
Before Image
After Image
Hope this helps.

Md. Ibrahim Hassan answer work until Xcode 13. And if you need to add separator for some cell, I recommend to draw by using UIView with height 1px.

Related

How can I add a tableViewCell inside another TableViewCell?

the problem here is that I've got a component thats a cell, and I want to include it in a tableview with some other icons and labels in the cell. Maybe the best solution here would be to include a tableview inside of the cells, with a unique cell in it. I've tried to do it and it worked but when it came to launch another screen when selecting the cell it only worked on the margin where the inside tableview isn't included, how could this be solved? something like this Thanks!
Change the isUserInteractionEnabled property of the inner table view to false.

Trying to hide UITableViewCell separator by using insets but it only decreases in opacity

I am trying to hide a UITableViewCell's separator by pushing it all the way to the right as far as it goes. So I set both the cell's separator inset and layout margins all the way to the right as far as they go. But this only makes the cell slightly more transparent. As you see in the picture, the lower line is slightly more transparent than the one above. There seems to be another line for the cell below the one I hide that I can't remove for some reason. No idea what could be causing this.
You can hide the separators by calling table.separatorStyle = .None on your UITableView.
Edit 2: I couldn't tell by the question that the goal was to remove cell separators for just one type of cell: as mentioned in my comment below, I'd advise removing the separators with the line above and adding a small-height UIView as a custom separator where you want it.
Hide tableview seperator simply by setting its property in attribute inspector.
Simply select the Attributes inspector and set seperator = none if you want to hide then otherwise if you want to do any operation with seperator color then set color on there.
UITabieViewCell generally contain two subviews: content view and separator line. If a cell's height is 44.f, content view's height is 43.f and 1.f for the line. You just move the line away, but the height of it is still there.

iOS) How to add default separator of uitableviewcell

Defaultly, it provides default separator between cells not for the first and last cell.
So first cell has no upper separator and last cell has no footer separator.
I need default one, not to make as UIView...
Is there any way to solve this problem?
If you don't want to create a custom border you can add a 'Dummy' cell of height 1. That will get you the default border.
You could do this putting small header and footer on your tableview.
You can create those with custom cells in your storyboard.

Space in the content of UITableView

Today I faced a weir bug in UITableView.
I have a UIViewController containing a UITableView. I also have a root viewcontroller, which will add the aforementioned UIViewController as a child.
Now when loaded, it shows a space between cells and the top border.
How can I fix that?
Try to deselect Adjust Scroll view insets option of the ComicsVC view controller.
First select ComicsVC item in the left window of your storyboard, then in the attributes inspector you will easily find this checkbox.
You have to set top position of UITableView to 0. Also you have to add constraints between UITableView and parent UIView.
This bug appears when you use translucent navigation bar.
That space shows up for grouped UITableViews, and is usually occupied by a section header. If you don't implement a section header, then the area will be blank.
If you don't have more than one section, go to the UITableView in the storyboard, show the properties, and change the style to Plain.
Hope this helps!

How to remove separator in between subclassed UITableViewCells?

I have subclassed UITableViewCell. This class is linked to the following xib, which is just a UITableViewCell with a label inside of it:
If you look closely at the bottom, you can see the divider there. How can I remove this?
Here's what the cells look like in a table view:
edit: My table view controller is a subclass of PFQueryTableViewController from the parse.com service. My apologies for neglecting to mention this.
edit2: I changed the colors of the separators to red and have discovered some very off behavior that might aid in figuring out why this isn't working. There seems to be some spacer on the far left of each divider:
Try to make it from the xib :
Go to xib
select table
make separator None.
You can do this with the UITableView property separatorStyle. Make sure the property is set to UITableViewCellSeparatorStyleNone and you should be good to go.
Set table separator style to none from design or code
It simple.. just Go to the Xib File where you have put the UITableView and right side in the attribute inspector you will find Seperator Option.. just select None in that
OR
You can do it manually with the code
tableview.separatorStyle = UITableViewCellSeparatorStyleNone;
just write this in your viewDidLoad method and it will be done..
Found the problem. When I had adjusted the height of the table view cell to 125 over the usual 44, i had adjusted the height of the view sitting inside of the table view cell, instead of the actual view cell.
Thanks for the help anyways to everyone who provided suggestions.

Resources