title: How to obtain the perfect % of the battery of an iPhone with iOS 7
body: <p>I'm new on stackoverflow. I've searched on so many sites for a solution to this question but I haven't found anything complete. My question is how can I obtain the percent value of the battery on an iPhone with the accuracy of 1%. I know that it's possible with a jailbroken device, but how? My code is below but it returns a value of 0.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>float percent =[[objc_getClass("SBUIController")sharedInstance] displayBatteryCapacityAsPercentage];
  
  batteryLabel.text = [NSString stringWithFormat: @"Battery is at %0.0f", percent];
  </code></pre>