如何从iPad中的应用程序调整设备的亮度 [英] How to adjust the brightness of the device from our app in iPad

查看:324
本文介绍了如何从iPad中的应用程序调整设备的亮度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPad开发一个电子书阅读器应用程序,我想添加一个功能,用户可以在该应用程序中调整设备的亮度。无论如何我可以在我的应用程序中实现这个.. ???

I am developing a eBook reader app for iPad and i want to add a feature where in the user can adjust the brightness of the device from the app. Is there anyway in which i can implement this in my app..???

推荐答案

我找到了一个简单的解决方案。我在我的图书阅读器视图中添加了一个清晰的颜色,我在滑块值更改事件时增加了此视图的alpha分量。通过这样做,我的视图变暗,我们感觉应用程序的亮度降低了。这个解决方案可能不太合适,但在我的情况下工作得很好。任何更好的解决方案总是受到赞赏。谢谢...

I found rather a simple solution for it. I am adding a UIVIew of clear color to my book reader view and i am increasing the alpha component of this view upon the slider value changed event. By doing this , my view gets darkened and we get a feeling that the brightness of the app is reduced.. This solution may not be very appropriate, but works just fine in my case. Any better solutions are always appreciated.Thank you...

这篇关于如何从iPad中的应用程序调整设备的亮度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆