1
Ich möchte PNG-Bild zwischen meinem Text von einem Etikett enthalten. wie damit in objective-c verfahren wird.Wie PNG-Bild zwischen Text eines Labels enthalten
Ich möchte PNG-Bild zwischen meinem Text von einem Etikett enthalten. wie damit in objective-c verfahren wird.Wie PNG-Bild zwischen Text eines Labels enthalten
Dies ist die Antwort, falls jemand es nützlich finden ----->
NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
attachment.image = [UIImage imageNamed:@"Attach-52.png"];
NSAttributedString *attachmentString = [NSAttributedString attributedStringWithAttachment:attachment];
NSMutableAttributedString *myString= [[NSMutableAttributedString alloc] initWithString:@"My label text"];
[myString appendAttributedString:attachmentString];
myLabel.attributedText = myString;
Ebenso können Sie PNG-Bild durch NSAttributedString hinzufügen.
versuchen Sie dieses: http://stackoverflow.com/questions/19318421/how-to-embed-small-icon-in-uilabel – sonique
danke das hat mein Problem gelöst :-) – raj