Skip to content

ComposéUI is a Swift framework for building UI using AppKit and UIKit with declarative syntax.

License

Notifications You must be signed in to change notification settings

honghaoz/ComposeUI

Repository files navigation

ComposéUI

build codecov swift platforms

ComposéUI is a Swift framework for building UI using AppKit and UIKit with declarative syntax.

Installation

Swift Package Manager

Add the following to your Package.swift file:

dependencies: [
  // add the package to your package's dependencies
  .package(url: "https://github.com/honghaoz/ComposeUI", from: "0.0.3"),
],
targets: [
  // add the product to your target's dependencies
  .target(
    name: "MyTarget",
    dependencies: [
      .product(name: "ComposeUI", package: "ComposeUI"),
    ]
  ),
]

Xcode

  1. Open your project in Xcode.
  2. Select the project in the sidebar.
  3. Select the project under the PROJECT section.
  4. Go to the Package Dependencies tab.
  5. Click the + button enter the package URL: https://github.com/honghaoz/ComposeUI.
  6. Click Add Package.
  7. Select the target you want to add ComposeUI to under the Add to Target section.
  8. Click Add Package.
  9. Add import ComposeUI in your file.

Usage

import ComposeUI

class MyContentView: ComposeView {

  @ComposeContentBuilder
  override var content: ComposeContent {
    Label("Hello, ComposéUI!")
      .transition(.slide(from: .top))
  }
}

License

ComposéUI is available under the MIT license. See the LICENSE file for more info.

About

ComposéUI is a Swift framework for building UI using AppKit and UIKit with declarative syntax.

Resources

License

Stars

Watchers

Forks

Languages