0

UICollectionViewmyclassdatasourceとに接続されている がありdelegateます。私が呼び出す[self.collectionview reloaddata]と正常に動作しますが、しばらくして(ランダムな時間と回数)、コレクションを再度リロードすると動作しなくなります。

コレクション参照デリゲートとデータソースが正しく定義されています。

self.devicesCollectionViewDataSource= devices;

self.devicesCollectionView.delegate = self;

self.devicesCollectionView.dataSource = self;

[self.devicesCollectionView reloadData];
4

1 に答える 1

0

setDelegateコレクション ビュー サブクラスのメソッドを上書きし、ブレークポイントを設定して、誰がそれを変更しているかを観察します。

-(void)setDelegate:(id<YOUR_PROTOCOL>)delegate {
    _delegate = delegate; // breakpoint here -> look at the trace log, it should give you the caller that's overwriting your delegate

}

明確化: これで問題が解決するわけではありませんが、少なくともどこを見ればよいかはわかります。

于 2014-12-15T13:54:48.560 に答える