macOS/iOS API解説

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

目次

removeTabStop:

段落スタイルから、指定したタブと種類・場所が同じタブを取り除きます
-(void)removeTabStop:(NSTextTab *)tabStop:

解説

段落スタイルから、指定したタブと種類・場所が同じタブを取り除きます。

返り値

( void )

なし

引数

( NSTextTab * )tabStop

タブストップ

フレームワーク

ApplicationKit

クラス

NSMutableParagraphStyle

Instance Methods

使用可能

10.0

参照

- addTabStop:
- setTabStops:
- tabStops (NSParagraphStyle)

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{

NSTextTab *tabStop1 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
                                        location:10];
NSTextTab *tabStop2 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
                                        location:20];
NSTextTab *tabStop3 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
                                        location:30];
NSTextTab *tabStop4 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
                                        location:20];

NSArray *arr = [NSArray arrayWithObjects:tabStop1,tabStop2,nil];
NSMutableParagraphStyle *pStyle = [[NSMutableParagraphStyle alloc] init];

[pStyle setTabStops:arr];
NSLog([[pStyle tabStops] description]);
[pStyle addTabStop:tabStop3];
NSLog([[pStyle tabStops] description]);
[pStyle removeTabStop:tabStop4];
NSLog([[pStyle tabStops] description]);

}

@end