目录
目录README.md

UIKitComponents

Reusable UI components built with UIKit.

Requirements

  • iOS 13.0+ / tvOS 13.0+
  • Swift 5.6+

Components

TextViewWithPlaceholder

UITextView with a placeholder.

let textView = TextViewWithPlaceholder()
textView.placeholder = "email@example.com"

// The appearance of the placeholder follows that of text view.
textView.font = .preferredFont(forTextStyle: .body)
textView.textAlignment = .center
textView.textContainerInset = .zero
textView.textContainer.lineFragmentPadding = 0
// etc...

Using UIKitComponents in your project

To use the UIKitComponents library in a SwiftPM project, add the following line to the dependencies in your Package.swift file:

.package(url: "https://github.com/jrsaruo/UIKitComponents", from: "1.0.3"),

and add UIKitComponents as a dependency for your target:

.target(name: "<target>", dependencies: [
    .product(name: "UIKitComponents", package: "UIKitComponents"),
    // other dependencies
]),

Finally, add import UIKitComponents in your source code.

关于
82.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号