Swift-如何限制几个特定的 文本字段仅允许插入int?

问题描述 投票:0回答:1

如何限制几个特定的​​文本字段仅允许插入int?并非所有文本字段。只有一些特定的。谢谢。

swift int uitextfield
1个回答
0
投票

已尝试设置textField的键盘类型?

yourTextField.keyboardType = .numberPad
© www.soinside.com 2019 - 2024. All rights reserved.