看板 MacDev 關於我們 聯絡資訊
請問有沒有方式可以改掉print 讓它印的東西是空的呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.24.234 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1505720157.A.493.html
Blueshiva: comment掉? 09/18 16:32
uranusjr: 語焉不詳 09/18 18:36
RINPE: 給他空的印出來不就是了 09/18 20:13
m339606: 空白問號 09/18 20:57
好過份 你們好酸Q_Q
shinrenpan: 是問類似objc 透過 macro 要不要NSLog 嗎? 09/18 21:47
對 感謝shinrenpan 以為是很一般的問題 不過是我沒問清楚啦 查了google沒有找到很好的解決方式 shinrenpan有類似的經驗嗎?
yuanruo: override print 你要怎麼改就怎麼改 09/19 08:32
這方法好像不是很漂亮 ※ 編輯: fightword (114.32.190.119), 09/19/2017 09:01:30
yuanruo: 你不就想問release時不要印東西嗎? 直接override最快 09/19 09:26
yuanruo: 不然你就自己寫一個DPrint 去用#if debug 這樣更醜 09/19 09:27
shinrenpan: 只能像 @yuanruo 建議的那樣做, 自己 google 09/19 10:10
shinrenpan: swift print release 09/19 10:10
gundam00: 在project的plist區分出production跟develop版本 然後 09/19 22:46
gundam00: override print 之後build production版本 就不會有了 09/19 22:47
fightword: 了解 謝謝 09/19 23:54