[英]How to change the position of minus button of tableview on editing mode(Swift)
I have found answer to this question in below link.But is in objective C.Please help to get it's Swift representation. 我在下面的链接中找到了这个问题的答案。但是在目标C中。请帮助获得它的Swift表示形式。
Changing the location of the minus sign in UITableView in Edit mode 在编辑模式下更改UITableView中减号的位置
Working example in Swift 3.0 Swift 3.0中的工作示例
override func layoutSubviews() {
super.layoutSubviews()
for subview in self.subviews {
if subview.isMember(of: NSClassFromString("UITableViewCellEditControl")!) {
var newFrame: CGRect = subview.frame
newFrame.origin.x = 280
subview.frame = newFrame
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.