<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 閱讀(410) 評論(0)  編輯  收藏 所屬分類: iphone
    主站蜘蛛池模板: 国产精品无码永久免费888| 亚洲色大成网站www永久男同| eeuss免费天堂影院| 免费人成网站在线播放| 国产尤物在线视精品在亚洲| 色吊丝最新永久免费观看网站 | 亚洲精品免费视频| 亚洲成AV人片在线播放无码| 国产偷伦视频免费观看| 亚洲va中文字幕无码久久| 免费看又黄又无码的网站| 精品亚洲麻豆1区2区3区| 999在线视频精品免费播放观看| 亚洲人成人77777在线播放| 永久免费AV无码国产网站| 亚洲中文无码永久免| 国产在线19禁免费观看| 一级视频免费观看| 亚洲邪恶天堂影院在线观看| 99久久精品日本一区二区免费| 国产精品亚洲精品观看不卡| 国产区卡一卡二卡三乱码免费| 久久嫩草影院免费看夜色| 1区1区3区4区产品亚洲| 日韩a级毛片免费视频| 国产高清视频免费在线观看| 在线电影你懂的亚洲| 国内精品免费视频自在线| 国产精品免费久久久久影院| 亚洲日本在线观看| 在线免费观看韩国a视频| 国产在线精品一区免费香蕉| 亚洲国产成人精品久久| 免费一级毛片在级播放| 一个人免费日韩不卡视频| 亚洲熟女www一区二区三区| 国产亚洲精品国看不卡| 波多野结衣在线免费观看| 一级做性色a爰片久久毛片免费| 亚洲日本va午夜中文字幕一区| 永久免费无码网站在线观看|