This is how I did it in Swift 4.2
private let pickerSelectionIndicatorHeight: CGFloat = 62.0
let pickerSelectionIndicatorTopLine = UIView()
let pickerSelectionIndicatorBottomLine = UIView()
pickerSelectionIndicatorTopLine.backgroundColor = UIColor.white
pickerSelectionIndicatorBottomLine.backgroundColor = UIColor.white
picker.addSubview(pickerSelectionIndicatorTopLine)
picker.addSubview(pickerSelectionIndicatorBottomLine)
pickerSelectionIndicatorTopLine.translatesAutoresizingMaskIntoConstraints = false
pickerSelectionIndicatorTopLine.leadingAnchor.constraint(equalTo: picker.leadingAnchor, constant: 0).isActive = true
pickerSelectionIndicatorTopLine.trailingAnchor.constraint(equalTo: picker.trailingAnchor, constant: 0).isActive = true
pickerSelectionIndicatorTopLine.heightAnchor.constraint(equalToConstant: 1).isActive = true
pickerSelectionIndicatorTopLine.centerYAnchor.constraint(equalTo: picker.centerYAnchor, constant: -(pickerSelectionIndicatorHeight / 2 + 1.0)).isActive = true
pickerSelectionIndicatorBottomLine.translatesAutoresizingMaskIntoConstraints = false
pickerSelectionIndicatorBottomLine.leadingAnchor.constraint(equalTo: picker.leadingAnchor, constant: 0).isActive = true
pickerSelectionIndicatorBottomLine.trailingAnchor.constraint(equalTo: picker.trailingAnchor, constant: 0).isActive = true
pickerSelectionIndicatorBottomLine.heightAnchor.constraint(equalToConstant: 1).isActive = true
pickerSelectionIndicatorBottomLine.centerYAnchor.constraint(equalTo: picker.centerYAnchor, constant: (pickerSelectionIndicatorHeight / 2 + 1.0)).isActive = true
this code can of course be encapsulated in extension if needed.