질문이 있습니다. 누군가가 (프로토콜)이 방법대리인이 메서드를 호출하지 않습니다.
[self.delegate poplogin];
poplogin를 호출 나에게 코드의 문제를 말할 수있는 그 어떤 이유로 작동하지 않는, 방법 이름입니다. 참조하기위한 방법의 poplogin
를 호출하지의 :
@property(nonatomic,retain) id<loginAuthDelegate> delegate;
그래서 나에게 사례를 설명하게
그래서 난 인터페이스 후@protocol loginAuthDelegate <NSObject>
-(void)poplogin;
@end
abc.h 클래스가 있다고 할 수 있습니다
@property(nonatomic,retain) id<loginAuthDelegate> delegate;
in .m i am just calling the Delegate and @synthesize it
[self.delegate poplogin];
not i have another files
let say def.h
i am importing the Class abc.h
@interface def : UIViewController<loginAuthDelegate>
def.m
-(void)poplogin
{
NSLog(@"Delegate doesn't respond to here");
vmpaSecureLogin *ivc = [[vmpaSecureLogin alloc] init];
ivc.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:ivc animated:YES];
}
위임자가 nil이 아닌 것은 확실합니까? – Kyle