Latest 1.0.0
Homepage https://github.com/Meniny/MXBatteryMointor-in-Objective-C
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit

MXBatteryMointor-in-Objective-C

MXBatteryMointor is an easy-to-use class to monitor battery status on iOS.

Installation with CocoaPods

pod 'MXBatteryMointor'

Usage

#import "MXBatteryMointor.h"
[[MXBatteryMointor defaultMointor] setBatteryLevelChangeAction:^ {
  // code here...
}];
[[MXBatteryMointor defaultMointor] setBatteryStateChangeAction:^ {
  // code here...
}];
[MXBatteryMointor startMointor];
float level = [MXBatteryMointor getBatteryLevel];
MXBatteryState state = [MXBatteryMointor getBatteryState];
NSString *level = [MXBatteryMointor getBatteryLevelString];
NSString *state = [MXBatteryMointor getBatteryStateString];

Latest podspec

{
    "name": "MXBatteryMointor",
    "version": "1.0.0",
    "summary": "An easy-to-use class to monitor battery status on iOS.",
    "description": "The first version of MXBatteryMointor, an easy-to-use class to monitor battery status on iOS.",
    "homepage": "https://github.com/Meniny/MXBatteryMointor-in-Objective-C",
    "license": "MIT",
    "authors": "Elias Abel",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Meniny/MXBatteryMointor-in-Objective-C.git",
        "tag": "1.0.0"
    },
    "source_files": "MXBatteryMointor/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This