Ricerca…


Sintassi

  1. NSTextAttachment * attachmentName = [[NSTextAttachment alloc] init];

Osservazioni

NSTextAttachment oggetti NSTextAttachment vengono utilizzati dal cluster di classe NSAttributedString come valori per gli attributi degli allegati. Gli oggetti che crei con questa classe sono indicati come oggetti allegati di testo o quando non risulta alcuna confusione, come allegati di testo o semplicemente allegati.

Esempio di NSTextAttachment

NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
attachment.image = [UIImage imageNamed:@"imageName"];
attachment.bounds = CGRectMake(0, 0, 35, 35);
NSAttributedString *attachmentString = [NSAttributedString attributedStringWithAttachment:attachment];


Modified text is an extract of the original Stack Overflow Documentation
Autorizzato sotto CC BY-SA 3.0
Non affiliato con Stack Overflow