addItem:
戻る/進むリストに項目を加えます
-(void)addItem :(WebHistoryItem *)item :
解説
戻る/進むリストに項目を加えます。
項目がnilであればNSInvalidArgumentExceptionを起こします。
返り値
( void )
なし
引数
( WebHistoryItem * )item
クラス
WebBackForwardList
Instance Methods
使用可能
10.2
参照
例文
- (IBAction)myAction:(id)sender { WebBackForwardList *bfList = [theWebView backForwardList]; // //history = [[WebHistory alloc] init]; // [WebHistory setOptionalSharedHistory:history]; WebHistoryItem *defaultItem1 = [[[WebHistoryItem alloc] initWithURLString:@"http://www.oomori.com/" title:@"oomori.com" lastVisitedTimeInterval:60.0 ] autorelease]; WebHistoryItem *defaultItem2 = [[[WebHistoryItem alloc] initWithURLString:@"http://www.apple.com/" title:@"apple computer" lastVisitedTimeInterval:60.0 ] autorelease]; //項目追加 //[history addItems:[NSArray arrayWithObjects:defaultItem1,defaultItem2,nil]]; [bfList addItem : defaultItem1]; [bfList addItem : defaultItem2]; [bfList goToItem:defaultItem2]; NSLog([bfList description]); }