0
、私はこれはtextStorageプロパティなぜ読み込み専用であれば、textstogrageプロパティでUITextViewコンテンツを編集できますか? UITextViewのためのアップルのドキュメントからの読み取り
The text storage object holding the text displayed in this text view. (read-only)
Declaration
OBJECTIVE-C
@property(nonatomic, readonly, strong) NSTextStorage *textStorage
のためにしかし、私の教授のノート読み取り専用であれば、それはtextStorageの可能編集属性だ方法
[self.body.textStorage
setAttributes:@{NSForegroundColorAttributeName : sender.backgroundColor}
range:self.body.selectedRange];
に読みますか?
ポインタの値(メモリのアドレス)は変更できません。あなたの意見では、なぜポインタが読み取り専用であることが重要ですか? – ndPPPhz
これは、UITextViewが内部的にtextStorageが指定されたサブクラスであると仮定できることを意味します。 – Mats
Uhm ...申し訳ありませんが理解できません:/ – ndPPPhz