<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    一點一滴,編程人生

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      69 隨筆 :: 0 文章 :: 25 評論 :: 0 Trackbacks
    three20 wiki 地址:https://github.com/facebook/three20/wiki/Debugging

    You can use Three20's debugging facilities instead of NSLog() / assert(). This would give you an ability to turn off debugging messages without commenting out all NSLog's, sort log messages by importance (errorwarninginfo).

    Turn on debugging(打開調試)

    These instructions are for Xcode 3:

    • Right-click on project, choose "Get Info".
    • In the "Build" tab, choose "Configuration => Debug" (you probably want to enable this only for debug builds)
    • While in the "Build" tab, search for "Preprocessor Macros" under the "GCC 4.2 - Preprocessing" section.
      • Add a declaration that reads DEBUG. That way you enable debugging in general.
      • Add a declaration that reads TTMAXLOGLEVEL=TTLOGLEVEL_INFO. By doing this, you set the default debugging output to beTTLOGLEVEL_INFO, the most descriptive one.

    Debugging preprocessor macro

    Use debugging

    Logging

    Use these instead of NSLog(). Which level gets printed to the console and which doesn't depends on what's set in preprocessor macros asTTMAXLOGLEVEL (see above).

    TTDERROR(text, ...)    // Log level 1 TTDWARNING(text, ...)  // Log level 3 TTDINFO(text, ...)     // Log level 5 TTDPRINT(text, ...) 

    Example

    If I got this in AppDelegate.m of my project HelloWorld:

    - (void)applicationDidFinishLaunching:(UIApplication *)application {	     TTDINFO(@"Hello!"); } 

    ...the console output would look like this:

    2010-05-15 01:04:20.107 HelloWorld[65222:207] -[AppDelegate applicationDidFinishLaunching:](22): Hello! 

    Conditional logging

    This is a type of logging facility which only outputs something if a particular condition is met:

    TTDCONDITIONLOG(condition, text, ...); 

    Example

    TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"Request parameters: %@", request.parameters); 

    Debug-only assertions

    Three20 also provides support for assertions which only work in the debug build.

    TTDASSERT(condition_which_would_lead_to_application_termination_when_true); 

    Example

    // Not that implementing safeAddSubview: is a good idea - (void)safeAddSubview:(UIView*)view {     TTDASSERT(nil != view);     if (nil == view) {         return;     }     [self addSubview:view]; } 

    See also

    Links

    posted on 2012-09-27 10:30 writegull 閱讀(402) 評論(0)  編輯  收藏 所屬分類: iphone
    主站蜘蛛池模板: 久久精品国产这里是免费| 直接进入免费看黄的网站| 亚洲网红精品大秀在线观看| 亚洲国产精品嫩草影院在线观看| 亚洲午夜福利717| 亚洲精品午夜无码电影网| 亚洲国产精品无码一线岛国| 亚洲va无码手机在线电影| 亚洲av无码乱码国产精品| 亚洲AV色香蕉一区二区| 中文字幕亚洲色图| 久久久亚洲裙底偷窥综合| 亚洲福利电影一区二区?| 久久精品亚洲AV久久久无码| 亚洲人成人网毛片在线播放| 亚洲精品无码专区在线播放| 亚洲AV无码AV吞精久久| 日本黄页网址在线看免费不卡| EEUSS影院WWW在线观看免费| 免费无码又爽又刺激网站| 久久国产精品成人片免费| 日韩欧美一区二区三区免费观看| 免费看片A级毛片免费看| 亚洲国产成人a精品不卡在线| 国产亚洲AV手机在线观看| 亚洲国产精品久久久久久| 亚洲av永久无码嘿嘿嘿| 精品国产亚洲第一区二区三区 | 毛片免费全部免费观看| 国产精品冒白浆免费视频| 久久亚洲国产成人影院网站| 亚洲国产精品一区二区久久hs| 亚洲欧洲自拍拍偷午夜色| 亚洲国产精品网站在线播放| 九九视频高清视频免费观看| 久久这里只精品国产免费10 | 男性gay黄免费网站| 成在人线av无码免费高潮喷水| 99视频全部免费精品全部四虎| 国产精品va无码免费麻豆| 亚洲日韩精品射精日|