NSMutableParagraphStyle:setParagraphStyle:
Home 目次>ApplicationKit>NSMutableParagraphStyle

setParagraphStyle:

別の段落スタイルで段落スタイルをセットします


-(void) setParagraphStyle:(NSParagraphStyle *)aStyle


【返り値】
   voidなし
【パラメータ】
   aStyle属性スタイル


【解説】

別の段落スタイルで段落スタイルをセットします。



【例文】


#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 ];

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

NSLog([[pStyle1 tabStops] description]);
[pStyle2 setParagraphStyle:pStyle1];
NSLog([[pStyle2 tabStops] description]);
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSMutableParagraphStyle
修正日2006.12.26