ComposéUI is a Swift framework for building UI using AppKit and UIKit with declarative syntax.
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"),
]
),
]- Open your project in Xcode.
- Select the project in the sidebar.
- Select the project under the PROJECT section.
- Go to the Package Dependencies tab.
- Click the + button enter the package URL:
https://github.com/honghaoz/ComposeUI. - Click Add Package.
- Select the target you want to add
ComposeUIto under the Add to Target section. - Click Add Package.
- Add
import ComposeUIin your file.
import ComposeUI
class MyContentView: ComposeView {
@ComposeContentBuilder
override var content: ComposeContent {
Label("Hello, ComposéUI!")
.transition(.slide(from: .top))
}
}ComposéUI is available under the MIT license. See the LICENSE file for more info.