0
메인 스레드가 시작한 타이머가 있습니다. 타이머 처리기에서 알림을 보내고 있습니다 5 개 중 1 개에서 게시 알림 코드가 실행될 때 EXC_BAD_ACCESS가 표시됩니다.타이머 핸들러에서 알림 보내기
//Registering Notification
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(TestNotification:)
name:@"TestNotification" object:nil];
//Starting timer
timer = [NSTimer scheduledTimerWithTimeInterval:2
target:self
selector:@selector(timerhandler:)
userInfo:nil
repeats:YES];
//Posting notification from timer handler
[[NSNotificationCenter defaultCenter]
postNotificationName:@"TestNotification" object:nil];
누군가가 도움을 줄 수 있습니까?
감사
'TestNotification :'메소드를 게시하십시오. 문제가있을 가능성이 큽니다. – spudwaffle