UITextViewを使用する場合、属性付き文字列にカスタム属性を追加しようとします。ただし、UITextViewのattributedTextに割り当てた後、すべてのカスタムキーは失われます。このような:
NSMutableAttributedString *lString = [[ NSMutableAttributedString alloc ] initWithString: @"astring"
attributes: @{ @"customkey": @"customvalue" }];
NSLog(@"string: %@", lString); // shows customkey present
textView.attributedText = lString;
NSLog(@"result: %@", self.textView.attributedText); // shows customkey missing
これは機能するはずですか?