1

*2_SimpleSectionedTableView* とTableSearchという Apple 開発者サイトの 2 つのサンプル コードを組み合わせようとしています。基本的に、セクションを含むタイムゾーンのテーブルをフィルター処理する
ために a を使用できるようにしたいと考えています。UISearchBar以下のコードは私のアプリをクラッシュさせます

整数からポインターへの変換に互換性がありません。

これはどういう意味ですか?どうすれば修正できますか?

- (void)filterContentForSearchText:(NSString*)searchText
{
/*
 Update the filtered array based on the search text and scope.
 */

[self.filteredListContent removeAllObjects]; // First clear the filtered array.

/*
 Search the main list for products whose type matches the scope (if selected) and whose name matches searchText; add items that match to the filtered array.
 */

for (NSInteger i=0; i<[self.regions count]; i++)
{
    Region *region = [self.regions objectAtIndex:i];
    for (NSInteger j=0; j<[region.timeZoneWrappers count]; j++) {
        {
            NSComparisonResult result = [[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathWithIndexes:i length:j] ].textLabel.text compare:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch) range:NSMakeRange(0, [searchText length])];
            if (result == NSOrderedSame)
            {
                [self.filteredListContent addObject:[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathWithIndexes:i length:j]]];
            }
        }
    }
}
}
4

1 に答える 1