rangeValue
NSRangeを返します
解説
NSRangeを返します。
返り値
( NSRange )
範囲
引数
フレームワーク
Foundation
クラス
NSValue
Instance Methods
使用可能
10.0
参照
+ valueWithRange:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //Rangeを渡す場合 NSRange aRange = NSMakeRange(1,10); NSValue *theValue3 = [NSValue valueWithRange:aRange]; NSRange bufferRange; [theValue3 getValue:&bufferRange]; NSLog(@"---%u,%u",bufferRange.location,bufferRange.length); NSLog(@"---%u,%u",[theValue3 rangeValue].location,[theValue3 rangeValue].length); } @end