看板 MacDev 關於我們 聯絡資訊
UIControl變數命名有什麼建議的方式嗎 例如 UIButton *addButton UIView *filterView 在最後面加上class的名常還蠻常見的 我自己也是這樣命名 但是像tableView跟collectionView的話大家也這樣命名嗎? UICollectionView *backgroundPickerCollectionView UITableView *photoListTableView -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.41.215.116 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1433071046.A.CBE.html
darktt: 只要是view的就是View結尾,viewController的就Controller 05/31 19:21
darktt: 結尾 05/31 19:22
darktt: 不過常常看到繼承UIViewController的給我用View結尾 05/31 19:22
darktt: 我自己還有一個特例,就是UITableViewCell或UICollection 05/31 19:23
darktt: ViewCell的會用Cell結尾就是了 05/31 19:24
neotek: 一個Controller裡面只有一個table或collection的話 05/31 19:38
neotek: 我都直接用tableView 或是 collectionView 05/31 19:38
neotek: 才不用每次切換到不同controller都要找一下這邊叫什麼名字 05/31 19:39
BS0824: 如果ViewController前面名稱太長,我會簡稱OOOOOVC比較好記 05/31 22:16
jfang: 雖然Objective-C本身就習慣長命名,但以ViewController來說 06/07 18:19
jfang: 我也習慣用VC當作結尾 06/07 18:19