UITextView z NSAttributedString i niestandardowe atrybuty nie działają
Podczas korzystania z UITextView próbuję dodać atrybut niestandardowy do przypisanego ciągu. Jednak wszystkie niestandardowe klucze są tracone po przypisaniu do atrybutu UITextView. Lubię to:
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
Czy to ma działać?