1
を呼び出していないNSNotificationメソッドを受け取ります。あなたは、通知を投稿するときは、私は、レジスタ通知のために、以下の使用を持っている
を呼び出していないNSNotificationメソッドを受け取ります。あなたは、通知を投稿するときは、私は、レジスタ通知のために、以下の使用を持っている
plzはあなたがpostNotification
[[NSNotificationCenter defaultCenter] postNotificationName:filter object:nil];
ありがとう、完璧 –
@ハリモハンようこそ:)それを正しくマークしてください。 –
befor最初
をaddObserverする必要があるコードチェックは、メモリ内にまだ観察対象ですか?投稿する前にaddObserverを終了しますか? – Larme
私はこれを最初に使用しています。 - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { [[NSNotificationCenter defaultCenter] postNotificationName:filter object:nil]; } そして、私は他のViewControllerで使用しています。 [[NSNotificationCenter defaultCenter] addObserver:セルフセレクタ:@selector(AllSearch :) name:フィルタオブジェクト:nil]; 今私はviewControllerクラスです。テーブルビューをスクロールすると "AllSearch"が呼び出されません。 –
@ハリモハンあなたは最初にこのコード[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AllSearch :) name:filter object:nil]; addObserver postnotificationの後の –