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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:24:01+00:00 2026-06-05T13:24:01+00:00

In my app I’m attempting to use the front camera by default in a

  • 0

In my app I’m attempting to use the front camera by default in a UIImagePicker. I know, seems simple enough…

imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;

Now, the first time I launch my picker everything works fine and the front camera is initialized, but when the picker is dismissed, and presented again the back camera is used. From there on out if I continuously open and close the picker the camera used will be: front, back, front, back, front, back…

I’ve stripped this code down to the bare basics of the picker attempting to isolate the problem and it persists. Has anyone run into this issue before? Any pointers or direction would be greatly appreciated!

EDIT: Problem solved! I was calling imagePicker = [[UIImagePickerController alloc] init]; in viewDidLoad instead of viewDidAppear!

  • 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-05T13:24:02+00:00Added an answer on June 5, 2026 at 1:24 pm

    The problem must be at how you try to initialize/present/dismiss your controller.

    So, why this back and forth between cameras?

    It seems that the underlying AVCaptureSession for some reason kept running after the dismiss of the controller. So the next time you presented it, it tried to add the input but it was bussy, so went to the next available (the rear camera), interrupted itself (thus freeing the previous one) and so on.

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

Sidebar

Related Questions

App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
The app I'm working on is relatively simple but it is throwing memory warnings.
app.js: app.use(express.compiler({ src: __dirname + '/public', enable: ['less']})); app.use(express.static(__dirname + '/public')); In my jade
My app seems to crash sometimes when I rotate the phone. ViewControllerA has a
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
My app is expanding, but the reqs dictate that there should be only one
Our app uses a component that requires a license file in the directory with
My app consists of 3 views. I've defined 3 helper methods in the AppDelegate
My app is made up of a TabBarController, each tab with a UITableView. On
My app was built with SDK 2.2.1 version even before 3.0 beta appear. User

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.