だから私は質問があります。メソッドを呼び出す(プロトコル)ためのこのコード行の問題を誰かに教えてもらえますか
[self.delegate poplogin];
poploginはメソッド名であり、何らかの理由で機能しません。メソッドpoploginを呼び出さない
参考のために :
@property(nonatomic,retain) id<loginAuthDelegate> delegate;
だから私はケースを説明させてください
だから私はクラスabc.hを持っているとしましょう
@protocol loginAuthDelegate <NSObject>
-(void)poplogin;
@end
インターフェース後
@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];
}