macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

smartDeleteRangeForProposedRange:

調査中
-(NSRange)smartDeleteRangeForProposedRange:(NSRange)proposedCharRange:

解説

調査中
指定した範囲を含んでいる空白文字を含んだ範囲を返します。

返り値

( NSRange )

範囲

引数

( NSRange )proposedCharRange

範囲

フレームワーク

ApplicationKit

クラス

NSTextView

Instance Methods

使用可能

10.0

参照

- smartInsertForString:replacingRange:beforeString:afterString:
- selectionGranularity
- smartInsertDeleteEnabled

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{

NSRange range ;
[myOutlet setSelectionGranularity:NSSelectByWord];
range = [myOutlet smartDeleteRangeForProposedRange:NSMakeRange(6,9)];

[myOutlet setSelectedRange:range];
NSLog([NSString stringWithFormat:@"%d,%d",range.location,range.length]);
}

@end