Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios segue不在脚本(xcode)中工作?_Ios_Xcode_Segue - Fatal编程技术网

Ios segue不在脚本(xcode)中工作?

Ios segue不在脚本(xcode)中工作?,ios,xcode,segue,Ios,Xcode,Segue,嗨,我正在尝试使用php登录程序 这是我的密码: - (IBAction)login:(id)sender { if ([username.text isEqualToString:@""] || [password.text isEqualToString:@""]) { UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Error"

嗨,我正在尝试使用php登录程序

这是我的密码:

- (IBAction)login:(id)sender
{
    if ([username.text isEqualToString:@""] || [password.text isEqualToString:@""]) {

        UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Error"
                                                               message:@"Input Your Value"
                                                              delegate:self
                                                     cancelButtonTitle:@"OK"
                                                     otherButtonTitles:nil, nil];
        [alertsuccess show];

    }

    else {
        NSError *err;

        NSString *strURL = [NSString stringWithFormat:@"http://192.168.1.5:81/cer_app/cer_login.php?username=%@", username.text];

        NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
        manage.commonuser = username.text;

        NSLog(@"%@", manage.commonuser);

        NSString *bb = password.text;

        NSDictionary *jsonArray = [NSJSONSerialization JSONObjectWithData:dataURL
                                                                  options:kNilOptions
                                                                    error:&err];


        NSMutableArray *array1 = [[NSMutableArray alloc] init];
        array1 = [jsonArray objectForKey:@"key"];

        NSLog(@"%@", array1);
        NSString *aa1 = [[array1 objectAtIndex:0]objectForKey:@"password"];
        NSString *bb1 = [[array1 objectAtIndex:0]objectForKey:@"temp_password"];

        if ([bb1 isEqualToString:@""]) {
            if ([bb isEqualToString:aa1]) {
                [self performSegueWithIdentifier:@"login" sender:self];
            }
            else {
                UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Error"
                                                                       message:@"password wrong"
                                                                      delegate:self
                                                             cancelButtonTitle:@"OK"
                                                             otherButtonTitles:nil, nil];
                [alertsuccess show];
            }
        }
        else {
            if ([bb isEqualToString:bb1]) {
                [self performSegueWithIdentifier:@"temp_login" sender:self];
            }
        }
    }
}

这里,我从php中获取了arrary1值,并显示在控制台中,但我的PerformsgueWithIdentifier不起作用。

是否检查了序列标识符?是的,我检查了。如果else阻塞,也没有错误日志,因为如果[bb IsequalString:bb1]返回false,你什么也不做。我已经做了。但是我的标识符性能不工作。解释不工作。它是被召唤而没有做你期望的事情,还是没有被召唤?您可以使用调试器逐步检查代码并查看哪个是正确的。