Skip to content

UITextInputを実装した、カスタム描画のテキストエディタのサンプルアプリ

License

Notifications You must be signed in to change notification settings

sikma-dev/MiniUITextInputSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniUITextInputSample

UITextInputプロトコルを使用したシンプルなテキストエディタのサンプルアプリです。

概要

このプロジェクトは、iOS上でカスタムテキストエディタを作成する方法を示すサンプルコードです。UITextInputプロトコルを実装することで、以下の機能を提供します:

  • テキストの入力・編集
  • テキスト選択
  • IME対応
  • キーボード表示

主な構成

  • EditorView: UITextInputプロトコルを実装したカスタムテキストエディタビュー
  • EditorViewRepresentable: SwiftUIでEditorViewを使用するためのUIViewRepresentable
  • Helper Models:
    • Pos: UITextPositionの派生、NSRangeをラップ
    • Range16: UITextRangeの派生、NSRangeをラップ
    • CustomTextSelectionRect: 選択ハンドル判定用の矩形

特徴

  • 等幅フォントを使用したシンプルなテキスト表示
  • 自前でのテキスト描画
  • UITextInputプロトコルによる標準的な入力処理

About

UITextInputを実装した、カスタム描画のテキストエディタのサンプルアプリ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages