delete lines between UITableViewCells in UITableView

IosXcodeUitableviewSwift

Ios Problem Overview


I've created an UITableView with UITableViewCell. Between the view cells there are grew lines. I want to delete these lines and don't want to show them, but I don't know how.

I work with Xcode 6.1 and Swift.

Here is a screenshot that displays my screen:

enter image description here

THX!

Ios Solutions


Solution 1 - Ios

Using Objective-C, we have:

[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];

for Swift 3:

self.tableView.separatorStyle = .none

for Swift 2:

self.tableView.separatorStyle = UITableViewCellSeparatorStyle.None

OR:

if you are using the InterfaceBuilder, you can set the tableView's Separator property to None enter image description here

Solution 2 - Ios

Within InterfaceBuilder you can set the Separator property to None or do it programmatically by setting the property separatorStyle of your table view to UITableViewCellSeparatorStyleNone.

Solution 3 - Ios

Swift 3:

tableView.separatorStyle = UITableViewCellSeparatorStyle.none

Solution 4 - Ios

You can do it from storyboard like this;

ss

Solution 5 - Ios

Swift 5 Programmatically

private func buildTableView() -> UITableView {
    let tableView = UITableView()
    tableView.translatesAutoresizingMaskIntoConstraints = false
    tableView.separatorStyle = .none

    return tableView
}

Solution 6 - Ios

Swift 5 :

cell.selectionStyle = UITableViewCell.SelectionStyle.none

Solution 7 - Ios

tableView.separatorStyle = .none

when initializing the tableview. It can be set or through the storyboard or nib

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGRmeView Question on Stackoverflow
Solution 1 - IosinstaableView Answer on Stackoverflow
Solution 2 - IosankaView Answer on Stackoverflow
Solution 3 - IosMarcos ReboucasView Answer on Stackoverflow
Solution 4 - IosSavas AdarView Answer on Stackoverflow
Solution 5 - IosMaatheusGoisView Answer on Stackoverflow
Solution 6 - Iospratik bhiyaniView Answer on Stackoverflow
Solution 7 - IosRandhir KumarView Answer on Stackoverflow