Ios 移除Eureka中单行的分隔线
如何删除Eureka表单中单行的分隔线? 我想删除tableview中的最后一行,即描述行下面的那一行。当我在常规tableview中寻找解决此问题的方法时,最流行的方法是通过设置一个大的分隔符插入,将特定单元格的分隔线推出屏幕。像这样:Ios 移除Eureka中单行的分隔线,ios,swift,uitableview,eureka-forms,Ios,Swift,Uitableview,Eureka Forms,如何删除Eureka表单中单行的分隔线? 我想删除tableview中的最后一行,即描述行下面的那一行。当我在常规tableview中寻找解决此问题的方法时,最流行的方法是通过设置一个大的分隔符插入,将特定单元格的分隔线推出屏幕。像这样: form.last! <<< TextAreaRow("description row") { $0.placeholder = "Description of the issue" $0.textAreaHeight = .
form.last! <<< TextAreaRow("description row") {
$0.placeholder = "Description of the issue"
$0.textAreaHeight = .dynamic(initialTextViewHeight: 44)
}.cellSetup{ cell, row in
cell.separatorInset = UIEdgeInsets(top: 0, left: 2000, bottom: 0, right: 0)
}.onChange{ [weak self] in
self?.issueMessage = $0.value ?? ""
}
form.last 请尝试以下代码:
form.last! <<< TextAreaRow("description row") {
$0.placeholder = "Description of the issue"
$0.textAreaHeight = .dynamic(initialTextViewHeight: 44)
}.cellSetup{ (cell, row) in
if(row != 3) {
cell.separatorInset = UIEdgeInsets(top: 0, left: 2000, bottom: 0, right: 0)
}
}.onChange{ [weak self] in
self?.issueMessage = $0.value ?? ""
}
form.last 请尝试以下代码:
form.last! <<< TextAreaRow("description row") {
$0.placeholder = "Description of the issue"
$0.textAreaHeight = .dynamic(initialTextViewHeight: 44)
}.cellSetup{ (cell, row) in
if(row != 3) {
cell.separatorInset = UIEdgeInsets(top: 0, left: 2000, bottom: 0, right: 0)
}
}.onChange{ [weak self] in
self?.issueMessage = $0.value ?? ""
}
form.last 斯威夫特4,5
在布局子视图中
public override func layoutSubviews(){
super.layoutSubviews()
对于self.subview中的视图,其中view!=self.contentView{
如果NSStringFromClass(类型(of:view))包含(“\u UITableViewCellSeparatorView”)
view.removeFromSuperview()视图
}
}
}
Swift 4、5
在布局子视图中
public override func layoutSubviews(){
super.layoutSubviews()
对于self.subview中的视图,其中view!=self.contentView{
如果NSStringFromClass(类型(of:view))包含(“\u UITableViewCellSeparatorView”)
view.removeFromSuperview()视图
}
}
}
是否尝试设置单元格的分隔符样式??self.tableView.separatorStyle=UITableViewCellSeparatorStyleNone是。它是tableview上的一个属性。它会删除所有单元格上的分隔线,这不是我要找的。你找到解决方案了吗?你试过设置单元格的分隔线样式吗??self.tableView.separatorStyle=UITableViewCellSeparatorStyleNone是。它是tableview上的一个属性。它会删除所有单元格上的分隔行,这不是我要找的。你找到解决方案了吗?这会有什么变化吗?你想删除第4项的行,意味着第3行。因此,如果(row!=3),我们可以保持更改,然后设置separatorInset,否则不会。所以它将显示0,1,2单元格的分隔符,而不是3单元格的分隔符,这有什么变化吗?您希望删除第4项的行,这意味着行将是3。因此,如果(row!=3),我们可以保持更改,然后设置separatorInset,否则不会。因此,它将显示0,1,2单元格的分隔符,而不是3单元格的分隔符