'DDXML.h' file not found とエラーが出ました。
#import "ChildViewController.h" #import "DDXML.h" @implementation ChildViewController { NSMutableArray * titleArray; NSMutableArray * linkArray; NSMutableArray * pubDataArray; } - (void)viewDidLoad { [super viewDidLoad]; // self.titleLabel.text = [NSString stringWithFormat:@"Page %i", (int)(self.pageIndex + 1)]; self.table.dataSource = self; self.table.delegate = self; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; // tableCell の ID で UITableViewCell のインスタンスを生成 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell==nil){ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; } // Configure the cell... UILabel * titleLabel = (UILabel *)[cell viewWithTag:1]; UILabel * dateLabel = (UILabel *)[cell viewWithTag:2]; [cell.contentView addSubview:titleLabel]; [cell.contentView addSubview:dateLabel]; return cell; } -(void)getXML1{ titleArray = [NSMutableArray array]; linkArray = [NSMutableArray array]; pubDataArray = [NSMutableArray array]; NSError * error = nil; NSURL * url = [NSURL URLWithString:@"https://news.yahoo.co.jp/pickup/rss.xml"]; NSData * data = [[NSMutableData alloc] initWithContentsOfURL:url]; DDXMLDocument * doc = [[DDXMLDocument alloc] initWithData:data options:0 error&error]; } @end
とコードを書いたとき
#import "DDXML.h"
の部分で上記のエラーが出ました。
#import "ChildViewController.h"
と書いた部分では何もエラーが出ていなくてなぜ
#import "DDXML.h"
でエラーが出たのかわかりません。
どう直せば良いのでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/07/28 13:31