Cocoa API解説(macOS/iOS)

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。

目次

initWithURLString:title:lastVisitedTimeInterval :

URL文字列とタイトルでweb履歴項目を初期化して返します
-(id)initWithURLString:(NSString *)URLString :
             title:(NSString *)title:
             lastVisitedTimeInterval :(NSTimeInterval )time 
Initializes the receiver with a URL specified by URLString , a title specified by title and the last time this item was visited specified by time .Web Kit normally creates WebHistoryItem objects for you but on occasion you might want to create an item and add it to the WebBackForwardList yourself. Note that when an instance is first initialized the strings returned by URLString and originalURLString are the same. :

解説

URL文字列とタイトルでweb履歴項目を初期化して返します。

返り値

( id )

オブジェクト()

引数

( NSString * )URLString 
( NSString * )title
( NSTimeInterval  )time 
Initializes the receiver with a URL specified by URLString , a title specified by title and the last time this item was visited specified by time .Web Kit normally creates WebHistoryItem objects for you but on occasion you might want to create an item and add it to the WebBackForwardList yourself. Note that when an instance is first initialized the strings returned by URLString and originalURLString are the same. 

クラス

WebHistoryItem

Instance Methods

使用可能

10.2

参照

例文

 WebHistoryItem *defaultItem1 = 
            [[[WebHistoryItem alloc] initWithURLString:@"http://www.oomori.com/"
                                    title:@"oomori.com"
                                    lastVisitedTimeInterval:60
                                    ] autorelease];
    WebHistoryItem *defaultItem2 = 
            [[[WebHistoryItem alloc] initWithURLString:@"http://www.apple.com/"
                                    title:@"apple computer"
                                    lastVisitedTimeInterval:60
                                    ] autorelease];
    //項目追加
    [history addItems:[NSArray arrayWithObjects:defaultItem1,defaultItem2,nil]];