Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
An interface for accessing device information.
This class is not meant to be instantiated. All methods are class implementations.
This class aims to simplify the interface for collecting device information. The low-level mach APIs provide a host of valuable information but it's often in formats that aren't particularly ready for presentation.
Definition at line 44 of file NIDeviceInfo.h.
Methods | |
Memory | |
(unsigned long long) | + bytesOfFreeMemory |
(unsigned long long) | + bytesOfTotalMemory |
Disk Space | |
(unsigned long long) | + bytesOfFreeDiskSpace |
(unsigned long long) | + bytesOfTotalDiskSpace |
Battery | |
(CGFloat) | + batteryLevel |
(UIDeviceBatteryState) | + batteryState |
Caching | |
(BOOL) | + beginCachedDeviceInfo |
(void) | + endCachedDeviceInfo |
+ (unsigned long long) bytesOfFreeMemory |
The number of bytes in memory that are free.
Calculated using the number of free pages of memory.
Definition at line 110 of file NIDeviceInfo.m.
+ (unsigned long long) bytesOfTotalMemory |
The total number of bytes of memory.
Calculated by adding together the number of free, wired, active, and inactive pages of memory.
This value may change over time on the device due to the way iOS partitions available memory for applications.
Definition at line 121 of file NIDeviceInfo.m.
+ (unsigned long long) bytesOfFreeDiskSpace |
The number of bytes free on disk.
Definition at line 135 of file NIDeviceInfo.m.
+ (unsigned long long) bytesOfTotalDiskSpace |
The total number of bytes of disk space.
Definition at line 149 of file NIDeviceInfo.m.
+ (CGFloat) batteryLevel |
The battery charge level in the range 0 .
. 1.0. -1.0 if UIDeviceBatteryStateUnknown.
This is a thin wrapper for [[UIDevice currentDevice] batteryLevel].
Definition at line 163 of file NIDeviceInfo.m.
+ (UIDeviceBatteryState) batteryState |
The current battery state.
This is a thin wrapper for [[UIDevice currentDevice] batteryState].
Definition at line 169 of file NIDeviceInfo.m.
+ (BOOL) beginCachedDeviceInfo |
Fetches the device's current information and then caches it.
All subsequent calls to NIDeviceInfo methods will use this cached information.
This can be a useful way to freeze the device info at a moment in time.
Example:
[NIDeviceInfo beginCachedDeviceInfo]; // All calls to NIDeviceInfo methods here will use the information retrieved when // beginCachedDeviceInfo was called. [NIDeviceInfo endCachedDeviceInfo];
Definition at line 181 of file NIDeviceInfo.m.
+ (void) endCachedDeviceInfo |
Stop using the cache for the device info methods.
Definition at line 194 of file NIDeviceInfo.m.