An iOS implementation of Bitcoin Wallet UI Kit, with example code implementations via Swift Previews.
Both WalletUI and its reference Bitcoin Wallet UI Kit are Work In Progress.
Basic Usage
Elements
Examples
References
Requirements
Installation
Implementation examples for SwiftUI and UIKit.
SwiftUI
Text("Bitcoin Orange")
.font(.caption)
.foregroundColor(Color(UIColor.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
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)
Side by side view of code interface and implementation example via Swift Previews.
Included are Swift Previews with code implemention examples of Bitcoin Wallet UI Kit (example: Hardware Wallet Interaction)
Bitcoin Wallet UI Kit:
Bitcoin Hardware Illustrations:
Bitcoin Icons:
WalletUI currently requires minimum deployment targets of iOS 14.
You can add WalletUI to an Xcode project by adding it as a package dependency.
- From the File menu, select Swift Packages › Add Package Dependency…
- Enter "https://github.com/reez/WalletUI" 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 WalletUI directly to your application.
- If you want to use this library from multiple targets you must create a shared framework that depends on WalletUI and then depend on that framework in all of your targets.