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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:05:09+00:00 2026-06-01T11:05:09+00:00

I have created 3 views. 1st view is home, 2nd is inventory and 3rd

  • 0

I have created 3 views.
1st view is home, 2nd is inventory and 3rd is overlay view.
Now from home screen using pushviewcontroller, i am navigating to the inventory view screen.
In inventory view i have one capture button. capture button will open camera on overlayview.
Now the issue is there is a button called back button in the overlayview, when i click on this button i want to navigate to the home screen, but for that i need to 1st dissmiss the camera. How is this possible?

Capture Button in Inventory View

   -(IBAction) btnCapture:(id) sender
   {
     @try 
     {
          [self showImagePicker:UIImagePickerControllerSourceTypeCamera]; 
     }
      @catch (NSException *exception) 
      {
         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Camera" message:@"Camera is not available  " delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
         [alert show];
         [alert release];
      }
}

In OverlayView Back button Event:

    -(IBAction)btnBack:(id)sender
     {
          app.navcntr=1;
          [self.delegate didFinishWithCamera];
          [self dismissModalViewControllerAnimated:YES];
      }

and in Inventory View, viewWillAppear

   -(void) viewWillAppear:(BOOL)animated
    {
          if(app.navcntr ==1)
          {
                [self.navigationController popToRootViewControllerAnimated:YES];
          }
           app.navcntr=0;
   }

The issue is it is navigating to home screen but application get crashed.
How to solve it?

Thanks.
enter image description here

  • 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-01T11:05:10+00:00Added an answer on June 1, 2026 at 11:05 am

    I think you are trying to dismiss your camera view twice. I mean didFinishWithCamera method will dismiss it. Remove the line [self dismissModalViewControllerAnimated:YES];

    -(IBAction)btnBack:(id)sender
         {
              app.navcntr=1;
              [self.delegate didFinishWithCamera];              
         }
    

    EDITED

    You should not perform animations when you are not on screen (“will appear”).

    Write your code in viewDidAppear like

    -(void) viewDidAppear:(BOOL)animated
        {
              [super viewDidAppear:animated];
    
              if(app.navcntr ==1)
              {
                    [self.navigationController popToRootViewControllerAnimated:YES];
              }
               app.navcntr=0;
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created navigaton view using Sencha touch 2. Navigation view has list component
I created one simple list view. i have two list view, my 1st list
I have created VIEWS and PartialVIEWS, but so far, i have seen that VIEWS,
I have created custom cell in which there are n number of image views.
I have created View A and View B. My window has View A displayed
I have created a View which prompts the user to input some records with
I have created a view in which there is a capture button. When i
if i have created a view model and have a partial form that is
I have a primary link accommodation, then i have created a view , called
I have created a list view that displays the names and dates of items

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.