superscriptRange:
指定した範囲の文字を上付きにします
-(void)superscriptRange:(NSRange)aRange:
解説
指定した範囲の文字を上付きにします。
aRangeがレシーバの範囲を越えればNSRangeExceptionを起こします。
返り値
( void )
なし
引数
( NSRange )aRange
フレームワーク
ApplicationKit
クラス
NSMutableAttributedString Additions
Instance Methods
使用可能
10.0
参照
- subscriptRange:
- unscriptRange:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSMutableAttributedString *maStr =[[[NSMutableAttributedString alloc] initWithString:@"AttributedString" attributes:nil] autorelease]; //スタイル指定 [maStr superscriptRange:NSMakeRange(2,5)]; [myOutlet setAttributedStringValue:maStr]; } @end