brianjohnson21 / WalletUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WalletUI

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

Basic Usage

Implementation examples for SwiftUI and UIKit.

Colors

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

Icons

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)

Elements

Side by side view of code interface and implementation example via Swift Previews.

Colors

colors-code-preview

Hardware Illustrations

hardware-illustrations-code-preview

Icons Filled

icons-filled-code-preview

Icons Outline

icons-outline-code-preview

Examples

Included are Swift Previews with code implemention examples of Bitcoin Wallet UI Kit (example: Hardware Wallet Interaction)

hardware-wallet-interaction

References

Bitcoin Wallet UI Kit:

Bitcoin Hardware Illustrations:

Bitcoin Icons:

Requirements

WalletUI currently requires minimum deployment targets of iOS 14.

Installation

You can add WalletUI to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Swift Packages › Add Package Dependency…
  2. Enter "https://github.com/reez/WalletUI" into the package repository URL text field
  3. 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.

About

License:MIT License


Languages

Language:Swift 100.0%