2014-11-21 57 views
3

在我的應用我發現actionsheet無法正常顯示,所以我創建一個單一視圖和按鈕操作一個鍵新鮮的示範項目,我有寫代碼像ActionSheet與IOS一個鍵問題8

-(IBAction)testActionsheet:(id)sender{ 
    UIActionSheet *objAction=[[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"ActionSheet issue",nil]; 
    [objAction showFromRect:CGRectMake(300, 500, 90, 9) inView:self.view 
       animated:YES]; 
} 

但顯示從頂端削減...有沒有人有解決這個問題,與行動表?

回答

0

UIActionSheet在iOS的8棄用 請檢查此鏈接 UIActionSheet is deprecated in iOS 8

,你可以用它代替actionsheet

UIAlertController

+1

UIAlertController也有同樣的問題UIAlertController。 – 2014-11-21 10:22:54

+1

不知道爲什麼有人downvoted。 UIActionSheet在iOS8中已棄用,因此Q不準確。 – 2014-11-23 00:01:57

+0

@BipinPatel我面臨同樣的問題與UIAlertController爲好, 我發現什麼是如果箭頭位於頂部/底部,然後它的工作的罰款既(UIAlertController和UIActionSheet),但沒有工作,如果其在左側或右側。 – 2014-11-24 04:40:07