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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:35:58+00:00 2026-06-03T00:35:58+00:00

I’m working through the CS193p Stanford iOS course and am nearly done with Assignment

  • 0

I’m working through the CS193p Stanford iOS course and am nearly done with Assignment 3 – in which I convert the graphing calculator to a universal app for iPad as well. The app draws a graph when a program (e.g. “x + 3”) is entered into the calculator and then the user presses a Graph button. On the iPhone, I simply segued when the Graph button was pressed, but in the iPad, I have a UISplitViewController that I set up a target action from the Graph button:

- (IBAction)ipadGraphPressed:(UIButton *)sender {
    if ([self splitViewGraphViewController]) {
        [[self.splitViewController.viewControllers lastObject] setProgram:self.brain.program];
    }
}

This calls setProgram: in the GraphViewController, which then calls setNeedsDisplay: on the GraphView and should draw the graph.

For comparison, here is the segue method that works on iPhone:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    [segue.destinationViewController setProgram:self.brain.program];
}

I am very sure that the connection is established between the button and its action method, but when I run the app, this action method never gets called when the button is pressed. Is there anything else to check for to ensure the method gets called?

  • 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-03T00:35:59+00:00Added an answer on June 3, 2026 at 12:35 am

    It turns out there was nothing wrong with my code, per se. After fiddling with the storyboard, I noticed that even if I added new buttons to the master view, they never showed up when the application launched. I tried changing the name of the storyboard from iPad.storyboard to iPad_1.storyboard, and then my changes showed up, but none of my rotation code was in effect. My solution to this whole mess was to backtrack to a previous version of the app right before I added the new storyboard. I re-added an iPad storyboard and was able to make all the correct connections.

    To confirm this, a friend of mine checked out the project on Github and reported that while I was not able to call the IBAction method, it worked perfectly fine for him. I believe there was something messed up with my local storyboard settings, and this was preventing the application from working correctly. My takeaway from this is to be careful with naming and renaming storyboard files, especially when dealing with version control.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I am trying to loop through a bunch of documents I have to put
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.