0

I'd like to show a battery indicator of a Bluetooth peripheral in my iOS app.

Is there a version of NSLevelIndicator (macOS) but that I could use in iOS?

The closest alternative I found is reversing the UIActivityIndicatorView but it's based on animation and I don't think it's a great idea for an animation to last for hours (slow of course).

axelmukwena
  • 779
  • 7
  • 24
  • 1
    Does this help? https://stackoverflow.com/questions/45750632/how-to-update-battery-level-in-ble-device-with-corebluetooth-in-swift – Scriptable May 21 '20 at 11:24
  • @Scriptable I think the question is more about the built-in UI element rather than getting the actual value – Dávid Pásztor May 21 '20 at 11:46
  • ah yeah it is, thanks David, i somehow missed that – Scriptable May 21 '20 at 11:47
  • 1
    I believe the keyword you need is 'gauge'. See for instance here: https://www.cocoacontrols.com/search?utf8=%E2%9C%93&q=gauge – koen May 21 '20 at 12:14
  • 1
    Ah, thank you @koen, wasn't aware of that. Found a great tutorial here then https://www.hackingwithswift.com/articles/150/how-to-create-a-custom-gauge-control-using-uikit – axelmukwena May 21 '20 at 12:20

0 Answers0