// ボタンをクリックすると、アラート ビューが表示され、ログインの詳細が入力されます。詳細が正しい場合は、次のビューに移動します。これを行う方法 ?
// ボタンをクリックすると、myButton メソッドが終了したときにアラート ビューが表示されます。流れを制御するには?
- (IBAction)myButton:(id)sender
{
flag= [self alertview];
if (flag)
{
SecondViewController *svc =[self.storyboard instantiateViewControllerWithIdentifier:@"vinay"];
[svc setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[self presentViewController:svc animated:YES completion:nil];
}
}
-(int)alertview
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Login"
message:[NSString stringWithFormat:@"Enter Login ID and Password:"]
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
flag=1;
[alert setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];
[alert show];
return flag;
}