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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:32:18+00:00 2026-06-09T00:32:18+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.

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

}

}

This question was asked before but i couldn’t get the solution thats why i am asking again. Apologise for that.
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-09T00:32:20+00:00Added an answer on June 9, 2026 at 12:32 am

    You can pass the data explicitly and in storyboard that is with the prepareForSegue call.

    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
        if([[segue identifier] isEqualToString:@"ContactsViewControllerSegue"]){
            ContactsViewController *cvc = (ContactsViewController *)[segue destinationViewController];
            cvc.contacts = self.contacts;
            cvc.delegate = self;
        }
    }
    

    For a full tutorial check out this website.

    To programmatically trigger the segue you can check the Apple Docs, but here is their example on orientation change.

    - (void)orientationChanged:(NSNotification *)notification
    {
        UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
        if (UIDeviceOrientationIsLandscape(deviceOrientation) &&
            !isShowingLandscapeView)
        {
            [self performSegueWithIdentifier:@"DisplayAlternateView" sender:self];
            isShowingLandscapeView = YES;
        }
    // remainder of example omitted....
    }
    

    So you will trigger the segue when shaking stops, and then prepare the next viewController in the prepareForSegue method.

    • 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 app (Xcode 4 using Storyboard) where I created a class for
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

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.