モーダルを表示する必要があるナビゲーション コントローラー内に ViewController があります。
ViewController のヘッダーは次のとおりです。
@interface ViewController : BaseViewController<AuthenticateDelegate>
そして、モーダルを提示する IBAction で:
AuthenticationController *authVC = [self.storyboard instantiateViewControllerWithIdentifier:@"AuthControllerView"];
authVC.delegate = self;
[self presentModalViewController:authVC animated:YES];
AuthenticationController の .h ファイルには次のように記述されています。
@interface AuthenticationController: BaseViewController<UITextFieldDelegate>
@property (nonatomic, assign) id <AuthenticateDelegate> delegate;
@end
ご覧のとおり、AuthenticationController のデリゲートとして "self" (ViewController) を割り当てましたが、何らかの理由でデリゲートは次の場所にあります。
- (IBAction)SubmitAuthentication:(id)sender;
{
[self.delegate validateUser:lblUsername.text :lblPassword.text];
[self dismissModalViewControllerAnimated:YES];
}
どんな助けでも大歓迎です。