7

I set Number Pad for my TextField on the Storyboard, because I need only numbers for my app. But it works for iPhone only. I can't find solution for iPad. I tried

override func viewDidLoad() {
        super.viewDidLoad()

        self.myTextField.keyboardType = .numberPad

but it doesn't work. Help me please.

Sheron Li
  • 77
  • 1
  • 6

1 Answers1

10

iPad doesn't have number only keyboard. You should implement your own. There are some git projects you can use like these:

- Some Swift Repositories:

- Some Objective-c Repositories:

Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278