BitcoinUI is a native iOS implementation of Bitcoin Wallet UI Kit.
Both BitcoinUI and its reference Bitcoin Wallet UI Kit are Work In Progress.
What's Included
Basic Usage
Requirements
Installation
The design system in BitcoinUI includes:
- Colors
- Button styles
- Text styles
- Icons
- Views
SwiftUI
Text("Bitcoin Orange")
.font(.caption)
.foregroundColor(.bitcoinOrange)
.multilineTextAlignment(.center)
UIKit
let label = UILabel()
label.frame = CGRect(x: 200, y: 200, width: 200, height: 20)
label.text = "Bitcoin Orange"
label.textColor = .bitcoinOrange
Three button styles (with a number of optional parameters) are implemented in SwiftUI:
-
BitcoinFilled
-
BitcoinOutlined
-
BitcoinPlain
SwiftUI
Button("Filled button") {
print("Button pressed!")
}
.buttonStyle(BitcoinFilled())
Ten text styles are implemented in SwiftUI:
-
BitcoinTitle1
-BitcoinTitle5
-
BitcoinBody1
-BitcoinBody5
SwiftUI
Text("Title")
.textStyle(BitcoinTitle1())
SwiftUI
BitcoinImage(named: "coldcard")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75.0)
UIKit
let image = BitcoinUIImage(named: "coldcard")
let imageView = UIImageView(image: image)
imageView.frame = CGRect(x: 0, y: 0, width: 75, height: 75)
view.addSubview(imageView)
BitcoinUI currently requires minimum deployment targets of iOS 15.
You can add BitcoinUI to an Xcode project by adding it as a package dependency.
- From the File menu, select Add Packages…
- Enter "https://github.com/reez/BitcoinUI" into the package repository URL text field
- Depending on how your project is structured:
- If you have a single application target that needs access to the library, then add BitcoinUI directly to your application.
- If you want to use this library from multiple targets you must create a shared framework that depends on BitcoinUI and then depend on that framework in all of your targets.