我遇到了AlertView問題。我正在嘗試使用UIAlertView
,點擊確定後它會返回到前一個屏幕,但似乎沒有任何建議?popViewController不能與UIAlertView一起使用
if (xGPSCoordinate==0 && yGPSCoordinate == 0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Failed to load the to get your current location"
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
return;
[self.navigationController popViewControllerAnimated:YES];
}
或
if (xGPSCoordinate==0 && yGPSCoordinate == 0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"iPoly"
message:@"Failed to load the to get your current location"
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
[self.navigationController popViewControllerAnimated:YES];
return;
}
都不起作用
當你進入這個觀點,你用推視圖控制器或presentModalViewController? – Neo 2012-08-16 08:59:55
我用pushViewController – sihao 2012-08-16 09:03:46
刪除標籤:Xcode無關緊要,並不限於iPhone – vikingosegundo 2012-08-16 09:04:10