<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
    主站蜘蛛池模板: 亚洲AV福利天堂一区二区三| 国产精品免费综合一区视频| 国产乱辈通伦影片在线播放亚洲| 亚洲另类无码专区首页| 永久免费毛片在线播放| 亚洲第一页在线视频| 黄+色+性+人免费| 亚洲一区在线视频| 午夜电影免费观看| 女bbbbxxxx另类亚洲| 免费一级大黄特色大片| 一级黄色免费大片| 亚洲夜夜欢A∨一区二区三区| 丝袜足液精子免费视频| 久久久久亚洲精品无码系列| 午夜视频在线免费观看| 亚洲欧洲综合在线| 免费观看的毛片手机视频| 色多多免费视频观看区一区| 亚洲成AV人网址| A级毛片高清免费视频在线播放| 无码乱人伦一区二区亚洲一| 57pao国产成永久免费视频| 国产成+人+综合+亚洲专| 国产成人免费片在线视频观看| 黄色免费网址在线观看| 成人午夜亚洲精品无码网站| 一区二区在线免费观看| 中文字幕乱码亚洲精品一区| 亚洲AV之男人的天堂| 日韩视频在线观看免费| 亚洲中文字幕无码爆乳app| 亚洲国产精品无码久久青草| 在线观看免费播放av片| 亚洲一级免费毛片| 亚洲国产一成久久精品国产成人综合| 国产高清不卡免费视频| 亚洲熟妇AV一区二区三区宅男| 亚洲欧洲美洲无码精品VA| 国产曰批免费视频播放免费s| 边摸边吃奶边做爽免费视频99 |