我想顯示在我的應用程序的開始UIActionSheet所以我descided火在我AppDelegate類,在didFinishLaunchingWithOptionsUIActionSheet在的appdelegate
使用
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Do you wish to install test cases " delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:nil otherButtonTitles: @"Yes", @"No", nil];
popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[popupQuery showInView:window];
[popupQuery release];
但火災例外情形
*由於未捕獲異常'NSInternalInconsistencyException'而終止應用程序,原因:'無效的參數不令人滿意:view!= nil'
如何解決
問候
我認爲它不是因爲你的動作表,因爲我使用了相同的代碼,並且在我的結尾工作的很好。 – saadnib 2011-04-04 12:29:33
你是如何使它工作的 – Ali 2011-04-04 12:42:38
我只是將上面的代碼粘貼在我的didFinishlaunching中,它適用於我,但我的窗口中有一個視圖,你有窗口中的視圖嗎? – saadnib 2011-04-04 12:44:32