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 8606129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:01:18+00:00 2026-06-12T03:01:18+00:00

Scenario An app that captures an image from Front camera automatically after 3 sec

  • 0

Scenario

An app that captures an image from Front camera automatically after 3 sec countdown.
Everything is working as expected.

Code

//in viewDidLoad

 if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
    imagePicker = [[UIImagePickerController alloc] init];
        self.imagePicker.sourceType =  UIImagePickerControllerSourceTypeCamera;
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
self.imagePicker.delegate = self;
self.imagePicker.showsCameraControls = NO;
[self.imagePicker.view setFrame:kAppFrame];
[self.view addSubview:self.imagePicker.view];
[self.view bringSubviewToFront:self.imagePicker.view];
}

Problem
I have never told the ipad to use its rear device Still in certain cases the rear camera starts.

Steps to reproduce

  1. Hold the camera in Landscape orientation
  2. Click a photo (Will take you to next screen, pushed in Nav controller)
  3. In the next screen tilt the ipad halfway towards face up orientation
  4. Comeback to camera screen and you see it using rear camera.

This is a very strange behavior I am not even able to understand its cause.

  • 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-06-12T03:01:19+00:00Added an answer on June 12, 2026 at 3:01 am

    It looks like I have found the solution.
    just moving the entire code to viewWillAppear from viewDidLoad method.

    It looked like I was relying a lot on view before it appeared with a certain orientation. Putting the code in viewWillAppear guaranteed me that the view is actually ready with its orientation set. I can now put anything on it.

    I know this is not the proper answer but this is what I made out of the scenario. Any modifications/correction are most welcome.

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

Sidebar

Related Questions

Scenario: I'm working on a rails app that will take data entry in the
The scenario is, i'm developing an android app that uses the internet. This is
Scenario: I build a simple web based app for mobile that needs to interact
scenario: a modular app that loads .py modules on the fly as it works.
This is the scenario i have: im developing a web app that will list
Scenario: An MVC3 app that uses constructor injection to provide services for a given
Actually I have the following scenario: I want to create an app that will
Tried to rebuild an app that was working just yesterday. Got a message that
The scenario is the following: Lets say I have this application App that depends
My app scenario is that I want to track employees location. I have a

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.