Ja wszyscy, Obecnie pracuję nad interfejsem logowania i hasła dla nowej aplikacji, a chciałbym wykonać warunek warunkowo, tylko wtedy, gdy hasło i login są w porządku. Stworzyłem Segue w Storyboard ze stylem "push" i "loginMainIdentifier". Folder realizacja jest napisany w sposób następujący:Automatyczne programowanie segmentacji scenariuszy
- (IBAction)pushValidateButton:(id)sender {
if([loginText.text isEqualToString:@""] || [passwordText.text isEqualToString:@""])
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Identification" message:@"Veuillez completer l'ensemble des cases SVP" delegate:self cancelButtonTitle:@"Revenir" otherButtonTitles:nil];
alert.alertViewStyle = UIAlertViewStyleDefault;
[alert show];
}
if(![loginText.text isEqualToString:@""] && ![passwordText.text isEqualToString:@""])
{
//creation of the request
NSMutableString *string = [[NSMutableString alloc] initWithCapacity:100];
NSString *string01 = @"http://89.82.227.112/Vico/login.php?l=&m=";
[string appendFormat:string01];
NSString *string02 = loginText.text;
NSString *string03 = passwordText.text;
[string insertString:string03 atIndex:41];
[string insertString:string02 atIndex:38];
NSURLRequest *request01=[NSURLRequest requestWithURL:[NSURL URLWithString:string]cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
//create the connection and start loading data
NSURLConnection *connection01 = [[NSURLConnection alloc] initWithRequest:request01 delegate:self];
if(connection01)
{
//Create NSMutableData to receive data
//receiveddata is an instance declared elsewhere
receivedData = [NSMutableData data];
}
}
[self performSegueWithIdentifier:@"loginMainSegue" sender:self];
}
ja nie rozumiem, dlaczego to nie działa z [self performSegueWithIdentifier:@"loginMainSegue" sender:self]
na końcu kodu.
Czy ktoś ma pojęcie o tym, czego brakuje, aby przeprowadzić segue tylko wtedy, gdy login i tekst są wypełnione.
Dziękuję
Victor
Dziękuję bardzo, błąd pisowni był właśnie w moim poście. Ale zmieniłem połączenie przejścia na cały ViewController i działa. Jeszcze raz dziękuję. Zwycięzca –