Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがiPhoneの自動明るさ機能をオン/オフに設定したかどうかを伝えるブール値のようなものを取得したいと思います。これは可能ですか?
UIScreen - currentMode のどこかで説明されると思いましたが、そうではないようです。
私はそれが可能だとは思わない。
Apple の公式パブリック API では、iOS アプリが設定アプリの一般設定にアクセスすることは許可されていません。そのため、設定アプリ内でトグル ボタンを変更/検出することはできません。
もちろん、以下のようにアプリの明るさを設定できます。
[[UIScreen mainScreen] setBrightness:X]( X は 0.0 ~ 1.0 の浮動小数点値)
[[UIScreen mainScreen] setBrightness:X]