제 질문은 매우 간단합니다. UITableView에서 이와 같은 구분 기호를 구현하는 방법입니다.UITableView : 사용자 정의 구분자
는이 코드
let screenWidth = UIScreen.mainScreen().bounds.width
let path = UIBezierPath(); path.lineWidth = 0.2
path.moveToPoint(CGPointMake(10, cell.height))
path.addLineToPoint(CGPointMake(screenWidth - 20, cell.height))
let shapeLayer:CAShapeLayer = CAShapeLayer()
shapeLayer.strokeColor = UIColor.blackColor().colorWithAlphaComponent(0.3).CGColor
shapeLayer.fillColor = nil
shapeLayer.lineDashPattern = [1,3]
shapeLayer.path = path.CGPath
cell.layer.addSublayer(shapeLayer)
에 의해 Cell.layer에 점선을 포함 CAShapeLayer를 추가하려고하는 데 사용하지만 자체 크기 테이블 뷰 셀과 작동하지 않았다
tableView.rowHeight = UITableViewAutomaticDimension
귀하의 도움에 감사드립니다!
의 사용 가능한 복제 [jQuery과 구분 라인 (http://stackoverflow.com/questions/4804632/uitableview-separator-line) –