人気ブログランキング | 話題のタグを見る

暑い日

NSTextView関係

久々の更新です。
色々有って、Objective-C全く進んでおりません。
今回は、よく忘れるので、NSTextViewへの値の挿入など

文字列を改行なしで追記

@synthesize _textView;
NSRange wholeRange;
NSRange endRange;
[_textView selectAll:nil];
wholeRange = [_textView selectedRange];
endRange = NSMakeRange(wholeRange.length, 0);
[_textView setSelectedRange:endRange];
[_textView insertText:content];

文字列を改行して追記

[_textView insertText:[text stringByAppendingFormat:@"\n"]];

ってな感じかな?
とりあえず作りたいアプリの一機能
by wagtail_co | 2012-07-18 04:22 | cocoaでMac
<< 文字列から数値へ変換 はじめの一歩 OpenPanel >>



ひとりごと

by wagtail_co
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31