Are we not supposed to be able to make custom Picker Styles?
struct CustomPickerStyle: PickerStyle {
static func _makeView<SelectionValue>(value: _GraphValue<_PickerValue<CustomPickerStyle, SelectionValue>>, inputs: _ViewInputs) -> _ViewOutputs where SelectionValue : Hashable {
}
static func _makeViewList<SelectionValue>(value: _GraphValue<_PickerValue<CustomPickerStyle, SelectionValue>>, inputs: _ViewListInputs) -> _ViewListOutputs where SelectionValue : Hashable {
}
}
Post
Replies
Boosts
Views
Activity
let categoryField: UITextField = {
let field = UITextField()
field.layer.borderWidth = 0.5
field.layer.borderColor = UIColor.gray.withAlphaComponent(0.5).cgColor
field.layer.cornerRadius = 5
field.textAlignment = .center
field.selectedTextRange = nil
field.placeholder = "Enter Title"
field.heightAnchor.constraint(equalToConstant: 50).isActive = true
field.translatesAutoresizingMaskIntoConstraints = false
field.autocorrectionType = .no
field.autocapitalizationType = .words
return field
}()Which is used below, inside of a viewDidLoad method in a viewController.let stackView = UIStackView(arrangedSubviews: [
categoryField,
UIView()
])
stackView.isUserInteractionEnabled = true
stackView.axis = .vertical
stackView.alignment = .fill
stackView.spacing = 8It works on Simulator, but when I take the code to a device it doesn't work at all. I've used the same code in other apps and they worked fine. Any thoughts on why it won't work in this?