From 692abd44213b32d507849cec74ec847c994cc257 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Thu, 18 Jun 2026 19:06:14 +0200 Subject: Add UIKit Support --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index dc8cec4..9819fd0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Norg Keyboard Toolbar This package provides a toolbar you can use whenever you need to edit norg -files. The toolbar provides the following buttons: +files in SwiftUI or UIKit apps. The toolbar provides the following buttons: The heading button creates a new heading, or increases the heading of the current level. See this table for examples. @@ -30,6 +30,8 @@ The code button adds a `@code` and `@end` block. ## Usage +### SwiftUI + Add the package to your project by including the repo URL with Xcode's package manager, and import it: @@ -54,6 +56,24 @@ struct EditorView: View { of the screen if a hardware keyboard is connected.) with the buttons described above. +### UIKit + +Add the package to your project by including the repo URL with Xcode's package +manager, and import it: + +```swift +import UIKit +import NorgKeyboardToolbar + +... + +let textView = UITextView() +textView.installNorgKeyboardAccessory() +``` + +`installNorgKeyboardAccessory` then attaches a toolbar above the keyboard with +the buttons described above. + ## Development A `Justfile` is provided to run common tasks: -- cgit