我試圖顯示UIActionSheet
中的取消按鈕,但它沒有顯示,是可以接受的行爲嗎?請指教。iPad上的UIActionSheet不顯示取消按鈕
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@"Are you sure you want to clear the cache?"
delegate:self
cancelButtonTitle:@"No"
destructiveButtonTitle:@"Yes"
otherButtonTitles:nil];
[actionSheet showInView:self.view];
[actionSheet release];
我很高興讀取,這意味着我不會讓用戶感到困惑和尋找的取消按鈕? – 2011-05-17 09:49:43
是的,這意味着大部分時間人們只需在iPad上的操作表之外點擊「取消」即可。查看iPad郵件應用程序,瞭解Apple處理此問題的一種方式(在肖像模式下,移動按鈕),或在照片應用程序中用於刪除按鈕。 – 2011-05-17 09:58:29
在iPad上沒有顯示取消按鈕的上下文中,在iOS8上,在UIActionSheet中不需要「取消」字符串。但是,在iOS7(及更早版本?)中,需要使用「取消」字符串,以便在最後兩項之間獲得分隔符(我認爲只有當您有兩個以上項目時才適用)。啊! – 2014-11-14 22:01:10