2011-11-17 10 views

답변

2
do this changes 

    [[NSNotificationCenter defaultCenter] postNotificationName:@"ALERTNOTI" object:nil]; 

    if you want to pass some object through the notification. then do this 
    ex: you want to pass an NSDictionary *dict 

    [[NSNotificationCenter defaultCenter] postNotificationName:@"ALERTNOTI" object:nil userInfo:dict]; 

알림을 통해 호출하려는 메소드는 다음과 같아야합니다.

-(void)method:(NSNotification *) notif 
    { 
     // your code here. 

     //if you want to access your dict 
     NSDictionary *myDict=[notif userInfo]; 



    } 
+0

을 위의 대답은 올바른 표시가 당신에게 tick..thank 경우 –

0

이 시도 :

[[NSNotificationCenter defaultCenter] postNotificationName:@"ALERTNOTI" object:nil]; 
관련 문제