問題タブ [nstextattachment]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - NSAttributedString の ReplaceCharactersInRange
NSAttributedString (NSTextAttachments を含む) の部分文字列 (@"replaceString" など) を別の NSAttributedString に置き換えたいと考えています。
NSMutableAttributedString の mutableString を操作しようとしましたが、その中の NSTextAttachments が省略されています。以下の答えは私のケースではうまくいきません。
ios - NSTextAttachment を含む NSAttributedString を保存 (または復元) できますか?
ユーザーがスタイルを使用してテキストを入力し、画像を挿入できるテキスト エディターを作成しているので、NSAttributedString を使用してコンテンツを管理しています。私の質問は、テキスト エディターを閉じる前にコンテンツを保存し、次回エディターを開いた後にコンテンツを復元するにはどうすればよいですか?
私は NSAttributedString のカテゴリを作成しました。現在、NSTextAttachment にテキストを保存 (および復元) できますが、UIImageView はできません。以下は私のコードの一部です。
}
私は調査と実験にかなりの時間を費やしました.検索すると、同じ質問をした人が何人か見つかりましたが、満足のいく答えはありませんでした.