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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:43:24+00:00 2026-06-10T14:43:24+00:00

I have an app that loads the camera and overlays buttons for fire, reload,

  • 0

I have an app that loads the camera and overlays buttons for fire, reload, and back, as well as a png that animates when the fire and reload buttons are tapped. How would I load the View Controller, which has a .xib with the buttons and image, as an overlay when the camera view loads?

I have the camera view loading when a button on the main screen is tapped, which used to open another View with the buttons and gun image.

Below is what I have done so far, which is loading the camera. I have a separate View Controller named PlayViewController, with an xib for the interface:

-(IBAction)getCameraPicture:(id)sender {


UIImagePickerController *picker = [[UIImagePickerController alloc] init];

picker.sourceType = UIImagePickerControllerSourceTypeCamera;

PlayViewController* overlay = [[PlayViewController alloc] initWithNibName:@"PlayViewController" bundle:nil];
picker.cameraOverlayView = overlay.view;
[picker setDelegate:overlay];
[self presentModalViewController:picker animated:YES];

}
This is in the PlayViewController.m: code

   #import "PlayViewController.h"
   #import "SoundViewController.h"

@interface PlayViewController ()

@end

@implementation PlayViewControlleriPad...

`

PlayViewController.h:

@interface PlayViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
{

two array declarations...

}

@property (weak, nonatomic) IBOutlet UIButton *reloadButton;
@property (weak, nonatomic) IBOutlet UIButton *fireButton;
@property (weak, nonatomic) IBOutlet UITextField *ammoField;
@property (weak, nonatomic) IBOutlet UIImageView *type;

@end
  • 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-10T14:43:25+00:00Added an answer on June 10, 2026 at 2:43 pm

    Create your view controller and xib as usual, then add this to your code:

    YourOverlay* overlay = [[YourOverlay alloc] initWithNibName:@"YourOverlayView" bundle:nil];
    picker.cameraOverlayView = overlay.view;
    [picker setDelegate:overlay];
    [self presentModalViewController:picker animated:YES];
    

    The overlay must implement UIImagePickerControllerDelegate and UINavigationControllerDelegate

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

Sidebar

Related Questions

I have an app that loads a UIWebView. And that works well. It is
I have a Grails app that loads its data from xml files and delivers
I have an app that when I click a button loads a new TabItem
I have a Cordova app that runs the jQuery mobile framework and loads pages
I have a flash app that plays movies. It loads subtitles and subtitle times
I have an app that loads records from a binary log file and displays
I have an Xulrunner app that loads fullscreen without any controls and loads a
I have a Windows Forms App that loads a dll @ runtime and executes
I currently have a simple iPhone app that loads a custom subclass of UIView.
I have a view based app that works well. (In other words, I'm not

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.