wait_fences: failed to receive reply: 10004003 的疑惑

來源:互聯網
上載者:User

廢話不說,先上代碼:

 1 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 2 { 3     switch (buttonIndex) { 4         case 0:{ 5             // 進入搜尋網頁面查詢適合崗位。 6             [self.navigationController popToRootViewControllerAnimated:NO]; 7             AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; 8             UITabBarController *tabbarController = [appDelegate tabbarController]; 9             [tabbarController setSelectedIndex:1];10         }11             break;12         case 1:{13             [self.navigationController popToRootViewControllerAnimated:YES];14         }15             break;16         default:17             break;18     }19 }

過程是這樣的:在彈出的alter中點擊按鈕(index==0)會先將目前的navController pop 到根視圖控制器,然後通過tabbarController切換到另外一個選項卡中。結果就遇到了wait_fences: failed to receive reply: 10004003 的警告,雖然程式不會crash,但是會有明顯的延遲。

 

如果只是navController的pop方法,無論 Animated 是否開啟都是沒有問題的,只是加上tabbarController的選項卡切換後就會出現wait_fences: failed to receive reply: 10004003 的警告。

 

經過網上問題的搜尋,初步判斷可能是因為在運行 clickedButtonAtIndex 方法時,alterview還沒有完成dismiss動畫過程(或者還根本沒有開始),這時進行頁面切換導致上面的問題,於是換用  didDismissWithButtonIndex 方法發現問題解決了(不過是在alterview dismiss動畫完成之後頁面才切換的)。

 

雖然問題解決了,但是還是不太清楚究竟根源錯在哪裡。。。等待大神指教。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.