How do i set the Separator Style of my UITableView in Swift? I want to get rid of the separator so that there is no grey line between the cells in my table view. Any suggestions would be greatly appreciated.Below is what I have already tried.
I have found this method in objective-C
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone] I tried my best to translate this to swift with
self.tableView.setSeparatorStyle = UITableViewCellSeparatorStyle.None But this presents the error
'(UITableView, numberOfRowsInSection: Int) -> Int' does not have a member named 'setSeparatorStyle' In the apple documentation it gives these declarations in objective-C
typedef enum : NSInteger { UITableViewCellSeparatorStyleNone , UITableViewCellSeparatorStyleSingleLine , UITableViewCellSeparatorStyleSingleLineEtched } UITableViewCellSeparatorStyle; So I tried again to translate it to Swift using
override func tableView(tableView: UITableView, setSeparatorStyle style: NSInteger) -> NSInteger { return UITableViewCellSeparatorStyleNone } But this just throws up more errors, "Use of unresolved identifier 'UITableViewCellSeparatorStyleNone"