1
다음 메서드는 viewController에 있습니다.다른 개체를 가리키는 메서드 선택기
refreshTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(refreshLabels) userInfo:nil repeats:YES];
appDelegate (또는 다른 클래스) 내부의 메서드를 현재 개체 대신 선택기에서 선택할 수 있습니까?
AppDelegate *ad = (AppDelegate *) [[UIApplication sharedApplication] delegate];
refreshTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector([ad refreshLabels]) userInfo:nil repeats:YES];
감사 : 같은
!
나는 이것을 이해할 수 없다고 생각할 수 없다 ... 고맙다! – Linus
당신은 .. 오신 것을 환영합니다 .. :) – janusbalatbat