如何在iphone应用程序中搜索表格单元格

时间:2010-06-19 10:56:51

标签: objective-c iphone

我开发了一个RSS iphone应用程序。 由于数据来自表格单元格中的xml feed,因此无法在其中实现搜索功能。 以下是在表格单元格中显示日期的代码

    int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1];

  NSString  *imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"image"];
    NSString *headline=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"title"];
    //code given to me
    NSURL *url = [NSURL URLWithString:imgstring];
    NSData *data = [NSData dataWithContentsOfURL:url];

    UIImage *img = [[UIImage alloc] initWithData:data];
cell.imageView.image=img;
    cell.textLabel.text=headline;
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;

任何人都可以帮助我实现搜索栏我在过去5天尝试过这个但是我没有实现它。 我会等你的回复。

0 个答案:

没有答案