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

  • Home
  • SEARCH
  • 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 4021498
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:21:33+00:00 2026-05-20T10:21:33+00:00

HI, I am creating an App in which countdown will be running. I want

  • 0

HI,
I am creating an App in which countdown will be running. I want to lock the iPhone when user taps on the button to start the countdown. Can anyone of you tell me how to do it. Any sample App or code will be very helpful.

here is the image which will make clear what I am asking for.
enter image description here

When I will slide the “lock” from left to right user will be ale to further interact with the App
Thanks in Advance!

  • 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-20T10:21:34+00:00Added an answer on May 20, 2026 at 10:21 am

    You wont be able to stop the user from hitting the home button to ‘close’ your app, but locking the App itself is pretty straight forward.

    Firstly, when a user hits ‘lock’, you can either hide the normal UI elements that allow user input & unhide the locking mechanism OR make the unlocking mechanism appear on another ViewController.

    As for the unlocking mechanism itself, you could use a UISlider and implement something like

    addTarget:self action:@selector(sliderMove:) forControlEvents:UIControlEventValueChanged
    

    to see when a user changes the position.

    If it reaches the maximum, then unlock & show your UI elements/remove from superview.
    If it doesn’t reach the maximum, then set the value back to minimum with

    setValue:position animated:YES
    

    Alternatively you could put a UIImageView on the screen, catch the touch events and create your own slider, but that seems like more work than using the built in UISlider.

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

Sidebar

Related Questions

I am creating a iPod app which will on multiple devices. For each user
I am creating an app which will have a question in a UILabel and
I am creating an iphone performance app in which I would like to know
I am creating an app which needs to be opened if a user double
I am in the process of creating an app in which a customer can
I am creating an app which will be used to upload images to a
I am Creating an app which will store data of songs in database, i
I'm planning on creating an app which will utilise Phonegap, however the app is
An iPhone app which I am creating generates reports from a Core Data database
I am creating an app for android which will be used by gym members.

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.