SwiftUI 排版工具 ✍️

Swift Version Compatibility

Swift Platform Compatibility

Twitter: @cypher_poet

用于在 SwiftUI 中进行排版调整的实用工具。

安装

Xcode 项目

选择 File -> Swift Packages -> Add Package Dependency 并输入 https://github.com/CypherPoet/SwiftUITypographyUtils

Swift Package Manager 项目

你可以将此项目作为包依赖项添加到你的 Package.swift 文件中

let package = Package(
    //...
    dependencies: [
        .package(
            url: "https://github.com/CypherPoet/SwiftUITypographyUtils",
            .upToNextMinor(from: .init(0, 3, 0))
        ),
    ],
    //...
)

然后,在你项目的任何目标依赖项中,引用 CypherPoetSwiftUITypographyUtils “包”提供的 SwiftUITypographyUtils “产品”

targets: [
    .target(
        name: "YourLibrary",
        dependencies: [
            .product(name: "SwiftUITypographyUtils", package: "CypherPoetSwiftUITypographyUtils"),
        ],
        ...
    ),
    ...
]

然后,只需在你想要使用它的地方 import SwiftUITypographyUtils 即可。

贡献

非常欢迎大家为 SwiftUITypographyUtils 做出贡献。查看一些issue 模板以获取更多信息。

💻 开发

要求

📜 创建 & 构建文档

文档使用 Xcode 的 DocC 构建。更多细节即将推出 -- 但目前,请参阅苹果关于如何构建、运行和创建 DocC 内容的指南

🏷 许可证

SwiftUITypographyUtils 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件