我想知道如何從屏幕底部顯示UIActionSheet。我試圖使用showInView:
方法與MainView
作爲視圖來顯示它,但我得到MainView Undeclared
錯誤。顯示UIActionSheet
7
A
回答
11
您需要參考控制器觀點:
[actionSheet showInView:self.viewController.view]
2
,或者你可以在主窗口中顯示它。如果你有一個tabbar應用程序,它會很有用。
[[[UIApplication sharedApplication] delegate] window];
8
如果試圖以顯示窗口上的UIActionSheet雖然你使用的TabBar或工具欄用戶界面,該ActionSheet的底部不響應您的觸摸。 你會更好地使用如下:
[[[UIApplication sharedApplication] delegate] window];
相關問題
- 1. 顯示多個UIActionSheet
- 2. UIActionSheet顯示兩次
- 3. 在UIAlertView上顯示UIActionSheet
- 4. 在UIActionSheet中顯示2列
- 5. 像UIActionsheet樣式顯示UITableView?
- 6. UIActionSheet只顯示一次
- 7. UIActionSheet顯示時禁用UIScrollView
- 8. 在UIActionSheet上顯示UIAlertView
- 9. 顯示來自UIBarButtonItem的UIActionSheet問題
- 10. UIActionSheet按鈕來顯示視圖
- 11. 按下UIActionSheet按鈕後顯示UIAlertView
- 12. 使用UIActionSheet在IOS中顯示通知
- 13. UIActionSheet不顯示行分隔符
- 14. iPhone:在UIActionSheet問題中顯示UIWebview
- 15. 在UIActionSheet取消按鈕不顯示iPhone?
- 16. UIActionSheet不顯示在彈出窗口
- 17. UIActionSheet不能從屏幕底部顯示
- 18. UIActionSheet不顯示 - 屏幕變暗
- 19. 顯示UIImagePickerViewController uiimagepickercontrollersourcetypephotolibrary從UIActionSheet在IPad
- 20. 如何在UIActionSheet中顯示UIImagePickerViewController?
- 21. UIActionSheet不顯示在iOS 8中
- 22. iPad的UIActionSheet表示多次
- 23. 如何更改UIActionSheet中按鈕的突出顯示顏色 - iPad
- 24. UIActionsheet不顯示運行iOS7的iPad上的所有按鈕
- 25. 更改UIImageView的alpha並從UIActionSheet中顯示
- 26. iPhone設置,是否可以在動作後顯示UIActionSheet?
- 27. 使用UIActionSheet在彈出框中顯示選擇列表
- 28. 如何從標籤欄顯示UIActionSheet半透明?
- 29. 如何從上方顯示UIActionSheet視圖標籤欄控制器?
- 30. UIActionSheet按鈕文本在iOS 8.x上不顯示
也看UIActionSheet文檔上showFromToolbar和showFromTabBar細節,如果你有一張的TabBar或工具欄。 – wkw 2009-11-09 17:41:14