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:].

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值