Append String to NSTextView

May 14, 2011 by · Leave a Comment 

- (void)appendStringToTextView:(NSString *)aStr
{
	NSRange tvRange;
    tvRange = NSMakeRange ([[textView string] length], 0);
    [textView replaceCharactersInRange:tvRange withString:aStr];
	[textView scrollRangeToVisible:tvRange];
    [textView display];
}

About admin

Comments are closed.