UITextView com NSAttributedString e atributos personalizados não estão funcionando
Ao usar um UITextView, tento adicionar um atributo personalizado a uma string atribuída. No entanto, todas as chaves personalizadas são perdidas após a atribuição de um attribedText do UITextView. Como isso:
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
Isso deveria funcionar?