為log標記不同顏色,便於區分日誌型別及debug
首先安裝外掛程式
* 是否啟用了xcodecolors,以自定義顏色顯示output log.
* 啟用的條件是:1)xcode安裝xcodecolors外掛程式,2)設定環境變數xcodecolors=yes
* * @return yes:開啟使用xcodecolors
*/bool isenablexcodecolors()
return no;
}
然後定義巨集(例如以藍色字型輸出log)
//use dlog to print while in debug model
#ifdef debug
#define xcode_colors_escape_mac @"\033["
#define xcode_colors_escape_ios @"\xc2\xa0["
#if 0
#define xcode_colors_escape xcode_colors_escape_ios
#else
#define xcode_colors_escape xcode_colors_escape_mac
#endif
#define xcode_colors_reset_fg xcode_colors_escape @"fg;" // clear any foreground color
#define xcode_colors_reset_bg xcode_colors_escape @"bg;" // clear any background color
#define xcode_colors_reset xcode_colors_escape @";" // clear any foreground or background color
# define dlog(fmt, ...) nslog((@"\n\n%s [line %d] \n" fmt), __pretty_function__, __line__, ## __va_args__)
# define logblue(fmt, ...) (!isenablexcodecolors() ? (dlog(fmt, ## __va_args__)) : (nslog((xcode_colors_escape @"fg0,0,255;" \
@"\n\n%s [line %d] \n" fmt xcode_colors_reset), __pretty_function__, __line__, ## __va_args__)))
例如,在需要新增注釋的地方連續輸入三個「/」個字元即輸入「///」即生成注釋模板
/**
* <#description#>
* * @param view <#view description#>
* * @return <#return value description#>
*/- (bool)egorefreshtableheaderdatasourceisloading:(egorefreshtableheaderview *)view
增強現實開發 增強開發人員的能力
增強現實開發 george emailed me with an interesting question.paraphrasing george,liberally,what s are some good ways to keep developerssharpening the saw cov...
提高Xcode開發效率
工程很大,電腦很差 主要因為沒有固態硬碟!從頭編譯要十多分鐘,每次開機xcode執行index也要十多分鐘,因此記錄下優化的方法。1.debug模式下不生成dsym檔案 2.使用ram磁碟 1 刪除derivedata rm rf library developer xcode deriveddat...
提高開發效率 as外掛程式 持續更新
共浴善其事,必先李琪琪 能偷懶 就絕不走彎路 極致懶蟲程式設計 好的 介紹兩款外掛程式 使用方法 右擊layout 資料夾 中的 xml 布局檔案 生成id的風格 然後貼上到相應的activity中的 中 2第二款外掛程式 android selectors generate 1安裝外掛程式 2 右...