CatalystAdditions implements missing features in Mac Catalyst.
:warning: Using this library may be rejected by AppStore reviews. :warning:
We can add to your project using Swift Package Manager.
All relevant code must be enclosed in a preprocessor, as shown below:
#if targetEnvironment(macCatalyst)
import CatalystAdditions
#endif
#if targetEnvironment(macCatalyst)
// use module APIs
#endif
let item = SearchToolbarItem(itemIdentifier: .search) { text in
// do something
}
let item = SearchToolbarItem(itemIdentifier: .search, textChanged: { (textChanged) in
// update search results as the user is typing
}) { (textReturned) in
// update search results only after return/enter key is pressed
}
In the current Catalyst, UITextView cannot set the focus ring. By default, the focus ring is displayed.
let textView: UITextView // A properly initialized TextView
textView.focusRingType = .none
link |
Stars: 8 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics