macOS/iOS API解説

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

目次

initWithURL:documentAttributes:

URLから属性付き文字列を初期化して返します
-(id)initWithURL:(NSURL *)anURL:
          documentAttributes:(NSDictionary **)docAttributes:

解説

URLから属性付き文字列を初期化して返します
文書属性を辞書で返します。
データを読むことができなければnilを返します。

返り値

( id )

文字列

引数

( NSURL * )anURL

URL

( NSDictionary ** )docAttributes

文書属性

フレームワーク

ApplicationKit

クラス

NSAttributedStringAdditions

Instance Methods

使用可能

10.1

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
    NSAttributedString *aString;

    NSURL *url = [NSURL URLWithString:@"http://www.oomori.com/"];
      aString = [[NSAttributedString allocWithZone:[self zone]] initWithURL:url documentAttributes:nil];

}
@end