zoukankan      html  css  js  c++  java
  • iphone 内存检测工具

    http://latest.docs.nimbuskit.info/NimbusOverview.html
    Nimbus Overview

    Sub-Modules

    Sensors
    Overview
    Logger
    Pages

    Overview

    The Overview is a debugging tool for quickly understanding the current state of your application. When added to an application, it will insert a paged scroll view beneath the status bar that contains any number of pages of information. These pages can show anything from graphs of current memory usage to console logs to configuration settings.

    overview1.png
    The Overview added to the network photo album app.

    Built-in Overview Pages

    The Overview comes with a few basic pages for viewing the device state and console logs.

    NIOverviewMemoryPageView

    overview-memory1.png
    The memory page.

    This page shows a graph of the relative available memory on the device.

    NIOverviewDiskPageView

    overview-disk1.png
    The disk page.

    This page shows a graph of the relative available disk space on the device.

    NIOverviewConsoleLogPageView

    overview-log1.png
    The log page.

    This page shows all messages sent to NSLog since the Overview was initialized.

    NIOverviewMaxLogLevelPageView

    overview-maxloglevel1.png
    The max log level page.

    This page allows you to modify NIMaxLogLevel while the app is running.

    How to Use the Overview

    To begin using the Overview you need to add two lines of code to your app and define DEBUG in your applicaton's preprocessor macros Debug target settings.

     - (BOOL)              application:(UIApplication *)application
        didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      // Line #1 - Swizzles the necessary methods for making the Overview appear as part of the
      // the status bar.
      [NIOverview applicationDidFinishLaunching];
    
      // After you create the UIWindow for your application and add the root view controller,
      // i.e.:
      [self.window addSubview:_rootViewController.view];
    
      // then you add the Overview view to the window.
      [NIOverview addOverviewToWindow:self.window];
    

    Events

    Certain events are useful in providing context while debugging an application. When a memory warning is received it can be helpful to see how much memory was released. for example.

    The Overview visually presents events on Overview graphs as vertical lines. Memory warnings are red.

    In the screenshot below, you can see when a memory warning occurred and the resulting increase in available memory.

    overview-memorywarning1.png
    A memory warning received on the iPad is shown with a vertical red line.

    How the Overview is Displayed

    The Overview is displayed by tricking the application into thinking that the status bar is 60 pixels larger than it actually is. If your app respects the status bar frame correctly then the Overview will always be visible above the chrome of your application, directly underneath the status bar. If the status bar is hidden, the Overview will also be hidden.

    Creating a Custom Page

    You can build your own page by subclassing NIOverviewPageView and adding it to the overview via [[NIOverview viewaddPageView:].

  • 相关阅读:
    speeding up your web site 前端性能优化
    数据结构与算法学习链表
    SQL Server 无法生成 FRunCM 线程
    NoSql的优缺点
    Vs2012中开发Node.js应用
    利用GNUstep在windows下编写objectc
    Hadoop HDFS学习总结
    HBase Thrift 接口的一些使用问题及相关注意事项
    .NET深入解析LINQ框架
    【翻译】ASP.NET Web API是什么?
  • 原文地址:https://www.cnblogs.com/zsw-1993/p/4879897.html
Copyright © 2011-2022 走看看