koogawa blog

iOS、Android、foursquareに関する話題

2013-12-05から1日間の記事一覧

【Tips】iOSデバイスのバッテリー残量を取得する(Swift対応)

iOSデバイスのバッテリー残量、充電状態を取得できます。 実装方法 バッテリー残量は次のように取得できます。 Objective-C: float batteryLevel = [UIDevice currentDevice].batteryLevel; Swift: let batteryLevel: Float = UIDevice.currentDevice().batt…