2012-03-26 5 views
-2

を実装することができません:アイテムは、私は私のデリゲートが呼び出さ取得したい選択された場合私はUIPopoverで、次のビューコントローラ持っUIPopoverController委任

を:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    if (delegate != nil) { 
     [delegate storeSelected:[items objectAtIndex:indexPath.row]]; 
    } 
} 

その処理する委譲クラスstoreSelectedが実装されています:デリゲートはゼロです。なぜわからないのですか?私はそれを割り当てている。

答えて

1

storesButtonClicked:メソッドでは、storePopover(その時点では初期化されていない)の代理人を設定しています。代わりにstorePopoverViewControllerというデリゲートプロパティを設定する必要があります。

storePopoverViewController.delegate = (id)self; 
+0

もちろんです。私はそれを見たはずです。ありがとう! –