简体   繁体   English

情节提要ViewController正在打开?

[英]Storyboard viewcontroller is opening?

When i click my login button i want to open home viewcontroller in my app,but just before somedays its working but now its not working ,when i click login it send the user details to server and give one server output .from this out put if it is "login" then i want move to home viewcontroller .Iam using Preforsegue method for next viewcontroller my viewcontroller id is "App" and segue id is also "App". 当我单击登录按钮时,我想在我的应用程序中打开home viewcontroller,但是在某天它可以工作但现在不起作用时,当我单击登录时,它将用户详细信息发送到服务器并提供一个服务器输出。这是“登录”,然后我想移至家庭viewcontroller。我对下一个viewcontroller使用Preforsegue方法,我的viewcontroller ID为“ App”,segue ID也为“ App”。 this is the code i used to move to next viewcontroller at login.now this is not working.. 这是我在登录时移到下一个viewcontroller的代码。现在这不起作用。

inside login button :this after sending url with post method..then following code will execute 内部登录按钮:使用post方法发送网址后,此方法将执行以下代码

  [NSURLConnection sendAsynchronousRequest:request
                                       queue:[NSOperationQueue mainQueue]
  completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
  NSString * serverOutput= [[NSString alloc]initWithData:data encoding:NSASCIIStringEncoding];
  NSLog(@"%@",serverOutput);

        if(serverOutput!=NULL)
              {

                if([serverOutput isEqualToString:@"login"])
                     {
                           [self getDetails];
                           [self performSegueWithIdentifier:@"App" sender:self];
                       }

 if(App)
  [self performSegueWithIdentifier:@"App" sender:self];
  [_alertView dismissWithClickedButtonIndex:0 animated:YES];

       }
     } ];
     _alertView = [[UIAlertView alloc] initWithTitle:@"Please Wait..."
                                        message:@"\n"
                                       delegate:self
                              cancelButtonTitle:nil
                              otherButtonTitles:nil];

UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

spinner.center = CGPointMake(139.5, 75.5);
[alertView addSubview:loading];

[spinner startAnimating];
[alertView show];

The value of "App" will be yes when i execute [self Detail] method 当我执行[self Detail]方法时,“ App”的值为yes

try giving a different id to segue and view controller. 尝试提供其他ID来搜索和查看控制器。 Clearly, you must have made some changes in the app somewhere and forgotten about it. 显然,您必须在某个地方对应用程序进行了一些更改,并且忘记了它。 Check the storyboard connection also. 还要检查情节提要板的连接。 Try deleting the segue and given it again. 尝试删除该序列并再次提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM