Re: NSAttributedString
Re: NSAttributedString
- Subject: Re: NSAttributedString
- From: Brett Powley <email@hidden>
- Date: Wed, 15 Feb 2006 07:56:25 +1100
Your question isn't 100% clear, but I'm guessing you want something
like:
NSMutableAttributedString *nickString = [[NSMutableAttributedString
alloc] initWithString: aNickName];
[nickString addAttribute:NSFontAttributeName
value:[NSFont
fontWithName:@"Helvetica-Bold" size:12.0]
range:NSMakeRange(0,
[nickString length])];
[nickString appendAttributedString:myOtherAttributedString];
(You can find the family-face name for the font using the FontBook
application with "Show Font Info". You could also use [NSFont
boldSystemFontOfSize:12.0])
Cheers,
Brett
On 15/02/2006, at 3:36 AM, Andrea Salomoni wrote:
Hi to all,
I have 2 strings, the first is a normal NSStrind and the second one
is a new NSAttributedString.
I need to append the NSAttributedString to a NSString in this way:
string = [[[NSMutableAttributedString alloc] initWithString:
[aNickName stringByAppendingString:aString]] autorelease];
I need to convert aNickName in a bold string append it to
aString.... but really cannot understand how.
How can I do?
Thank you all
Andrea
--------------------------------------------------------------
Brett Powley -- PhD Candidate
Centre for Language Technology, Macquarie University, Australia
w: http://www.ics.mq.edu.au/~bpowley
faciendi plures libros nullus est finis
frequensque meditatio carnis adflictio est
--------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden