25 lines
451 B
Swift
25 lines
451 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
|
|
public func numberPad() -> some View {
|
|
#if os(iOS)
|
|
self.keyboardType(.numberPad)
|
|
#else
|
|
self
|
|
#endif
|
|
}
|
|
|
|
#warning("Fix me.")
|
|
// The decimal pad autocompletes too quickly in the simulator, needs tested on an actual
|
|
// device.
|
|
public func decimalPad() -> some View {
|
|
#if os(iOS)
|
|
// self.keyboardType(.decimalPad)
|
|
self.keyboardType(.numberPad)
|
|
#else
|
|
self
|
|
#endif
|
|
}
|
|
}
|