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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:18:20+00:00 2026-06-16T00:18:20+00:00

i am sure this is a very nooby question but i can not find

  • 0

i am sure this is a very nooby question but i can not find it anywhere on the internet, or maybe am looking wrong but.

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>  
{    
//how do i fit this code--> idUIAccelerometerDelegate
//into the interface where it is the only place it can work?
    IBOutlet UIImageView *imageView;
    UIImage *image;
    UIImagePickerController *imagePicker;
    UIImagePickerController *imagePicker2;
  //the code above is already linked with the @interface at the top thingy.


 //but now i also want to link the @accelerometer but it won't let me without any errors.
    float valueX;
    float valueY;

}
@property (nanotomic,strong)  IBOutlet UIButton *snow;

-(void)awakeAccelerometer;
-(void)acc

- (IBAction)takePhoto;
- (IBAction)chooseExisting;

@end

thank you for any help sorry if i wasted your time. down vote me by all means if you wish to.

  • 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-16T00:18:21+00:00Added an answer on June 16, 2026 at 12:18 am

    I believe you are wanting your object to receive the messages from the accelerometer, If that is true then you dont want to add a delegate, you want to become the delegate.

    your class will Conform the the UIAccelerometerDelegate much like it does the UIImagePickerControllerDelegate and the UINavigationControllerDelegate and will look something like this

    // Your new interface line.
    @interface ViewController : UIViewController <UIAccelerometerDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>  
    

    and you would add the following function to your class

    - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration{
        // Handle the accelorometer and acceleration objects to determine what happened.
    }
    

    Be aware that this method is deprecated in ios 5, and now you should look into Core Motion. This should work on ios 6 still, but its a good possibility it will go away in the near future.

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

Sidebar

Related Questions

I am sure this is very simple but I can't find an answer anywhere.
I'm sure this a very nooby question, but I can't figure it out. I
I'm sure this is a very simple question, but embarrassed to say I can't
I'm sure this has a very simple answer, but I can't seem to find
I'm sure this is a very noob-ish question, but I've been looking for this
I'm pretty sure that this question is very noob but I'm not used to
I'm sure this is very simple, but I can't find it. In the close
I'm sure this is a very simple fix but I cannot seem to find
Not very sure if this is the right way of asking, but I was
This is a very rudimentary question, but I am sure someone out there knows

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.