ALL OF ME
2014年7月18日
iOS 7 開發教學 - 增加 UITextField 的清除內容按鈕 ( iOS 7 Add a clear button to UITextField element tutorial )
之前介紹了如何變更 UITextField 的 Return 鍵的種類,這次要介紹如何增加 UITextField 物件的清除內容按鈕。
首先,第一個在 TextField 中加入 Clear button 的方法很簡單,透過 Storyboard 選擇 TextField 物件,如下圖:
第二個方可以透過在View controller 中設定 UITextField 的屬性
clearButtonMode
,請參考下圖:
可以設定的參數如下:
設定完顯示結果,如下圖:
以上就是兩個在 TextField 中加入清除內容按鈕的方法。其他 iOS 相關開發教學可以參考
本篇整理
。
較新的文章
較舊的文章
首頁
熱門文章
Mac - 從終端機利用 Terminal-notifier 發送 OS X Notification ( Send native notifications from terminal by using terminal-notifier on Mac OS X )
相信大家有時等待測試、shell script 完成任務需要很長的時間,因此希望任務完成可以即時收到通知。在 Mac 上有 Growl 可以滿足這個需求,但 Growl 是收費軟體。所以我採用 terminal-notifier 工具發送 OS X 的通知 ( Notific...
Play Framework 實作教學 (3) - 加入 JSON 實作 ( Get and return JSON )
這篇要來介紹如何在 Play Framework 搭配 JSON 實作,網路上看到很多操作 JSON 物件的文章,在官方網站上也有 相關的說明 可以參考,但是這邊要來分享一下我自己操作 JSON 的方法。
Play Framework 實作教學 (4) - 使用資料庫 ( 以 H2 資料庫為例 ) ( Use H2 database )
這次要來介紹 Play Framework 如何與資料庫作連結,Play Framework 本身有提供了一個精巧的資料庫 ( H2 Database Engine ),所以就以使用 H2 資料庫來作本篇教學範例,關於 H2 Database Engine 更詳細的資訊可以參考 ...
Eclipse - 加入自訂的 Libraries
當專案想加入自訂的 Libraries 時可以透過 Eclipse 加入並群組化,過程非常方便跟簡單。而且若之前有建立過的 Libraries 也可以直接引入,不需要每新增專案就得重新一一加入 JAR 檔。
Play Framework - 安裝於 Windows ( Install Play Framework on Windows )
這篇記錄在 Windows 7 上安裝 Play Framework, 官方安裝頁面 也有安裝步驟可以參考, 但似乎在 Windows 上的相關講解比較少所以在此補充一些。