Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jrsaruo/uikitcomponents
Reusable UI components built with UIKit.
https://github.com/jrsaruo/uikitcomponents
ios textview-placeholder ui-components uikit
Last synced: about 1 month ago
JSON representation
Reusable UI components built with UIKit.
- Host: GitHub
- URL: https://github.com/jrsaruo/uikitcomponents
- Owner: jrsaruo
- License: mit
- Created: 2022-06-12T09:53:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T14:46:28.000Z (over 1 year ago)
- Last Synced: 2024-10-30T17:21:33.388Z (about 2 months ago)
- Topics: ios, textview-placeholder, ui-components, uikit
- Language: Swift
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIKitComponents
Reusable UI components built with UIKit.
## Requirements
- iOS 13.0+ / tvOS 13.0+
- Swift 5.6+## Components
### `TextViewWithPlaceholder`
`UITextView` with a placeholder.
```swift
let textView = TextViewWithPlaceholder()
textView.placeholder = "[email protected]"// 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:
```swift
.package(url: "https://github.com/jrsaruo/UIKitComponents", from: "1.0.4"),
```and add `UIKitComponents` as a dependency for your target:
```swift
.target(name: "", dependencies: [
.product(name: "UIKitComponents", package: "UIKitComponents"),
// other dependencies
]),
```Finally, add `import UIKitComponents` in your source code.