在 iOS 裡彈跳式視窗主要分為由下方昇起的 UIActionSheet 以及Dialog 類型的 UIAlertView iOS8起 UIAlertView 已 deprecated, 改統一使用 UIAlertController 用法範例如下 Simple alert example: UIAlertController * alert= [UIAlertController alertControllerWithTitle:@”Password required” message:@”Please
按鈕放最下方的設計問題 有時候 App 為了設計上的需求,並不採用官方的右上 Edit/Done 的作法,而是將確定的按鈕放在最下方,我相信大家用 Windows 久了,也習慣看到按鈕在最下方。這個作法乍看下沒什麼問題… 不過在實作上,卻會遇到按鍵昇起之後擋住了按鈕的尷尬情況。 = =” 方法一:使用 UITableViewController 自動處理 如果 UI 是使用 UITableViewController 的話,很幸運的它會自動處理這個問題。這裡有個小技巧,要將 TextView 與 Button 放在同一個 Cell 裡,若放在下一個