|
| 1 | +[简体中文](README_CN.md) |
| 2 | + |
1 | 3 | # ReerKit
|
2 | 4 | ReerKit is a collection of native Swift extensions that provide convenient methods, syntactic sugar, and performance improvements for various native data types, UIKit, and Cocoa classes for iOS, macOS, tvOS, watchOS, and Linux platforms.
|
3 |
| -Some of the source code is gathered from various sources on the internet for utility classes or extension methods, with some code optimization and bug fixes. The remaining content is developed by myself. All system type extensions in the framework have the `re` infix added to avoid ambiguity issues when calling the same name extension, such as `"SGVsbG\n8gV29ybGQh".re.base64Decoded`, `"123".re.md5String`. |
| 5 | +All system type extensions in the framework have the `re` infix added to avoid ambiguity issues when calling the same name extension, such as |
| 6 | +```swift |
| 7 | +SGVsbG\n8gV29ybGQh".re.base64Decoded |
4 | 8 |
|
5 |
| -[简体中文](README_CN.md) |
| 9 | +"123".re.md5String |
| 10 | +
|
| 11 | +view.re.addSwiftUIView(Color.red) |
| 12 | +``` |
| 13 | +
|
| 14 | +There are also a of other convenient features available. |
| 15 | +```swift |
| 16 | +// Access dictionary contents using dot notation implemented by dynamic member lookup |
| 17 | +let dict: [String: Any] = ... |
| 18 | +dict.dml.user_name.re.string <=> dict["user_name"] as? String |
| 19 | +
|
| 20 | +// Weak reference container, automatically removes elements when they are destroyed. |
| 21 | +WeakSet, WeakMap |
| 22 | +
|
| 23 | +// Set grayscale mode for UIView |
| 24 | +view.re.isGrayModeEnabled = true |
| 25 | +
|
| 26 | +// Data Structure Encapsulation |
| 27 | +BinaryTree, Tree, LinkedList, Queue, BoundedQueue, Stack, OrderedSet, OrderDictionary |
| 28 | +
|
| 29 | +// Lock Encapsulation |
| 30 | +MutexLock, ReadWriteLock, Synchronizing, UnfaireLock |
| 31 | +
|
| 32 | +// PropertyWrappers |
| 33 | +Clamped, Locked, Rounded, RWLocked, Trimmed |
| 34 | +
|
| 35 | +// Other Utility |
| 36 | +RSA, AES, CountdownTimer, Debouncer, Throttler, DeinitObserver, KeyboardManager, Keychain, Reachability, NanoID, MulticastDelegate |
| 37 | +
|
| 38 | +// Additionally, it provides a large number of extension methods and vars for frameworks such as the standard library, UIKit, and Foundation. |
| 39 | +String+REExtensions |
| 40 | +UIView+REExtensions |
| 41 | +Array+REExtensions |
| 42 | +Date+REExtensions |
| 43 | +... |
| 44 | +``` |
6 | 45 |
|
7 | 46 | ## Requirements
|
8 |
| -iOS 12.0+ / tvOS 12.0+ / watchOS 4.0+ / macOS 10.13+ / visionOS 1.0+ / Ubuntu 14.04+ |
| 47 | +iOS 12.0+ |
| 48 | +macOS 10.13+ |
| 49 | +tvOS 12.0+ |
| 50 | +watchOS 4.0+ |
| 51 | +visionOS 1.0+ |
| 52 | +Ubuntu 14.04+ |
9 | 53 | Swift 5.9+
|
10 |
| -XCode 15.2+ |
| 54 | +XCode 15.4+ |
| 55 | +
|
| 56 | +## Usage |
| 57 | +[Documents build by DocC](https://swiftpackageindex.com/reers/ReerKit/1.1.1/documentation/reerkit) |
11 | 58 |
|
12 | 59 | ## Installation
|
13 | 60 |
|
@@ -56,5 +103,4 @@ let package = Package(
|
56 | 103 | <summary>Manual</summary>
|
57 | 104 | </br>
|
58 | 105 | <p>Add the <a href="https://github.com/reers/ReerKit/tree/main/Sources">ReerKit</a> folder to your Xcode project to use all extensions or specific extensions.</p>
|
59 |
| -</details> |
60 |
| - |
| 106 | +</details> |
0 commit comments