Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7068765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:21:50+00:00 2026-05-28T05:21:50+00:00

As a new AppDeveloper, I’ve never used orientation. So, I would like to try

  • 0

As a new AppDeveloper, I’ve never used orientation. So, I would like to try to learn with a simple task. What I want to do is have the screen fade to black when the device is set face down. Is that something that would be simple to do, that perhaps somebody could assist me in, or provide helpful information?

Thanks! 😀
Your help is appriciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:21:51+00:00Added an answer on May 28, 2026 at 5:21 am

    You can use orientation (using the XYZ values when the screen is face down). I do not recommend this, because your screen will fade out even if a user is using the app while lying down, and staring up at the screen.

    There is an easier and cleaner way. Notice how during phone calls, having the phone close to your ear blacks out the screen?

    You can access that property by monitoring the proximityState property of UIDevice. Details here

    Doing something like:

    BOOL closeToUser = [[UIDevice currentDevice] proximityState];
    

    will assign a YES to closeUser when the device is face down on a surface of some kind, and a NO when it is not

    If the value is YES, you can invoke code to do whatever you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to Applets, I have never dealt with having to export the resources to
New to mvc, I have a controller like this public ActionResult Index(DateTime Date, DateTime
New to using Backbone and have a very simple application. Basically there are Clients
new with javascript here. I have a simple form that takes what the user
New to silverlight. Traditionally if I were to design a wizard-like process where a
NEW EDIT: I have narrowed my problem to this - i have a view
new to java and brand new to the site. I have a JLabel added
New to jquery question... Using jQuery, depending on the radio button clicked I would
New to NodeJS. Yes I know I could use a framework, but I want
(New to Objective-C, but well versed in C/C++). Presently I have an Objective-C class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.