1
我創建了用戶名和密碼的登錄頁面。當我單擊登錄按鈕時,將出現錯誤的密碼消息。但它進入下一頁。任何人都可以幫助我?我的代碼如下:帶有錯誤密碼的登錄按鈕轉到下一個視圖
-(IBAction)enterCredentials
{
if ([[credtialsDictionary objectForKey:usernameField.text]isEqualToString:passwordField.text])
{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"correct password" message:@"This password is correct." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil,nil];
[alert show];
}
else
{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Incorrect password" message:@"This password is incorrect." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil,nil];
[alert show];
}
}
能否請你把一些代碼在這裏,我們可以看到什麼是錯在你的代碼。 – 2014-10-20 06:05:52
顯示允許您導航到下一頁的代碼。以上代碼僅包含警報。 – Rumin 2014-10-20 06:11:01
無論您發佈什麼內容,它都會起作用。也許你可以發佈更多的代碼,所以我們可以幫助你。 – Veeru 2014-10-20 06:11:18