SwiftUI Hexadecimal Keyboard
HexBoard is an Hexadecimal Keyboard for iOS
made entirely using SwiftUI 3
and Swift 5.5.1
HexBoard is a SwiftUI HexBoardView that is initially positioned off the screen
It needs to be stacked in the last position of a ZStack in order to overlap all the other views when it shows
ZStack {
//... your views here ...
HexBoardView()
}
It needs two parameters to work:
show: Bool
- in order to toggle the view of the HexBoardtext: String
- the value on which the HexBoard works
Just inject the HexBoard as an Environment Object:
@main
struct HexBoardApp: App {
@StateObject private var hexBoard = HexBoard()
var body: some Scene {
WindowGroup {
MainView()
.environmentObject(hexBoard)
}
}
}
And use it where needed:
@EnvironmentObject var hexBoard: HexBoard
TextField("Text", text: $hexBoard.text)
Text(hexBoard.text)
You need all the files (except the MainView that is an example) in your XCode project
Goojoob.dev - Original development - goojoob
This work is licensed under a Creative Commons Attribution 4.0 International license (CC BY 4.0).
- Talk to others about this project 📢
- We can have a ☕ whenever you want