私は自分のアプリケーションにsearchBarを統合しました。それはうまくいった。しかし、テーブルビューに新しい要素を追加した後は、searchBarはもう機能しません。 cellIdentifierに問題があるようです新しいオブジェクトを追加した後にSearchBarが動作しなくなる
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; // Here i get: >Control reaches end of non void function<
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
if (searching)
{
VerwaltungInformation *searchedFormel = [copyListOfFormularies objectAtIndex:indexPath.row] ; //Here i get: >Thread 1: Program received signal "SIGABRT"<
cell.textLabel.text = searchedFormel.nameFormel;
}
else
{
NSDictionary *dictionaryCell = [listOfFormularies objectAtIndex:indexPath.section];
NSArray *arrayCell = [dictionaryCell objectForKey:@"Formel"];
VerwaltungInformation *cellValue = [arrayCell objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue.nameFormel;
}
return cell;
- が、私はそれを把握することはできません:私は、このコードブロックでエラーメッセージを取得します。
ありがとうございました!あなたがオブジェクトを返さずに、あなたのnon void
方法を包んとき
しかし、新しい要素を追加した後にsearchBarがうまくいかない理由はわかりません... PS:私は客観的に新しい...私は本当にあなたが意味するものを得ることができません... – Daniel05
あなたは見ていますかコード内のコメントのようなコンパイラのエラーが表示されたり、アプリケーションを実行できますか?期待どおりに動作していませんか? – danh
CellIdentifier = NSCFString * \t 0x1b440セル 私は何かを得ることはありません... – Daniel05