BitcoinUI

1.0.5

The Bitcoin UI Kit for Swift
reez/BitcoinUI

What's New

1.0.5

2024-06-22T01:49:04Z

What's Changed

  • ui: add addressformattedview by @reez in #95
  • readme: add address view by @reez in #96

Full Changelog: 1.0.4...1.0.5

cover image

BitcoinUI

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

What's Included

The design system in BitcoinUI includes:

  • Colors
  • Button styles
  • Text styles
  • Icons
  • Views

colors-code-preview buttons-code-preview text-code-preview hardware-illustrations-code-preview hardware-illustrations-code-preview

Basic Usage

Colors

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

Button Styles

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())

Text Styles

Ten text styles are implemented in SwiftUI:

  • BitcoinTitle1 - BitcoinTitle5

  • BitcoinBody1 - BitcoinBody5

SwiftUI

Text("Title")
    .textStyle(BitcoinTitle1())

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)

Requirements

BitcoinUI currently requires minimum deployment targets of iOS 15.

Installation

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

  1. From the File menu, select Add Packages…
  2. Enter "https://github.com/reez/BitcoinUI" 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 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.

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Dec 02 2024 17:44:53 GMT-1000 (Hawaii-Aleutian Standard Time)