本文介绍了删除Eureka中单行的分隔线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何删除Eureka表单中单行的分隔线?
我想删除表格视图中的最后一行,即描述行下方的那一行.当我使用常规的表格视图四处寻找解决此问题的方法时,最流行的解决方案是通过设置较大的分隔符插入点将特定单元格的分隔符线推出屏幕.像这样:
I would like to remove the last line in the tableview, the one underneath the description row. When I looked around for a solution for this problem with a regular tableview, the most popular solution is to push the separator line of a specific cell out of the screen by setting a large separator inset. Like this:
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 ?? ""
}
我在 viewDidLoad
上调用它,但是似乎没有任何效果.我是尤里卡的新手.
I'm calling this on viewDidLoad
, but it doesn't seem to have any effect. I'm new to Eureka.
推荐答案
迅速4、5
在 layoutSubview
public override func layoutSubviews() {
super.layoutSubviews()
for view in self.subviews where view != self.contentView {
if NSStringFromClass(type(of: view)).contains("_UITableViewCellSeparatorView")
view.removeFromSuperview()
}
}
}
这篇关于删除Eureka中单行的分隔线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!