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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:59:03+00:00 2026-06-09T01:59:03+00:00

I am using Xcode 4.3.1 . I have created the UI using Storyboard which

  • 0

I am using Xcode 4.3.1. I have created the UI using Storyboard which has many View Controllers.

Issue

In my app i am using ShakeGesture. While shaking i am doing some operations, its working fine. But, when shaking get stopped i need to pass some values to another View controller to display it. I have seen many post it says how to pass value when button clicked,but no one related with my problem.

It would be great if you solve my issue

My question is

How to pass values from one View to another View controller after shaking get stopped?

I am looking for any examples or tutorials. Much appreciated.

EDIT

Exact function for the above question

I am having an button in First View Controller

enter image description here

When the button triggered it will popup pickerview with some datas. When the user selects it the picker value replaces the button value.

enter image description here

Then Shaking happens when it stopped i have to pass the data to other view controller.

Code

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.subtype == UIEventSubtypeMotionShake)
{
        // I need to pass data here. Thats i am confusing

}

}

Thanks for your help guys

  • 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-09T01:59:05+00:00Added an answer on June 9, 2026 at 1:59 am

    Create a segue by ctrl dragging from the first view controller to the second one in the storyboard. Click on the segue and go to the identity inspector (press command-option-3). In the identifier field give it a name, say “Shaking Stopped”. Then in your motion ended method use…

     [self performSegueWithIdentifier:@"Shaking Stopped" sender:self];
    

    This will make the view switch to your second one. Then in your prepare for segue change it to this…(of course using your own values)

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
        if ([segue.identifier isEqualToString:@"Shaking Stopped"]) {
    <The Second View Controller> *controller = segue.destinationViewController
            //change your values in the other view controller here 
            controller.someValue = self.someValue //an example
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Xcode 4.3.1 . I have created the UI using Storyboard which
I have an iPad app created using XCode 4 with Storyboard. I have a
Currently using Xcode 4.2 and I have two view controllers (1 and 2). I
I have created a xcode project using unity3d tool, while building the project for
I created my app using StoryBoard. Then, I added objective-c class to have .h
Using Xcode 4.2 Storyboard, I've just created a segmented control in a view with
I have created a new Xcode project using Storyboards (tab view template). I added
I created a project in xcode 4.2 using the feature of storyboard. I have
Have started playing with Xcode 4.2, and created a single page application using storyboard
I am using Xcode 4.2 in which I have created various classes which shows

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.