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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:55:32+00:00 2026-06-03T04:55:32+00:00

I am creating an app in XCode 4.2 using the storyboard feature. I have

  • 0

I am creating an app in XCode 4.2 using the storyboard feature. I have 4 views connected on the basis of Navigation controller. In one of the view I have a textbox and a button. I have implemented the keyboard hide on return by adding the textbox as the deligate. Once I am done entering on the textbox box i will press the button and it should update the UIImageView.

I understand i need to establish some kind of relation between the UIImageView on the Interface Builder and the UIImageView IBoutlet i have declared on the interface file. But how do i do this in storyboard situation ?

In the abcViewController.h i have

@interface abcViewController:UIViewController {   
   IBOutlet UITextField *code;    
   IBOutlet UIImageView *qrImage;  
}  
@property (noatomic, retain) UITextField *code;  
@property (noatomic, retain) UIImageView *qrImage  
-(IBAction)textFieldReturn:(id)sender;  
-(IBAction)goButton:(id)sender;

In the abcViewController.m i have

 @synthesize code; 
 @synthasize qrImage; 
-(IBAction)textFieldReturn:(id)sender{ 
   [sender resignFirstResponder]; 
} 
-(IBAction)goPressed:(id)sender{ 
   [qrImage setImage:[UIImage imageNamed:@"qr.png"]]; 
}

In the Interface Builder MainStoryboard.storyboard I have established the relationship in the view’s First Responder for the textbox’s textFieldReturn and button’s goPress to corresponding events and I have linked textbox as the deligate of this view. Now do i have to connect UIImageViewer to the `First Responder as well ? If yes how ?

  • 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-03T04:55:33+00:00Added an answer on June 3, 2026 at 4:55 am

    I think you may be using a few terms incorrectly, but there are two different types of connections you can make between a view in Interface Builder and the code. When you say you “established a relationship” between the 1st reponder and the button and textfield, it sounds like you connected their Actions. What that does is creates a path from the view (button, text field, etc), to the object you connected it to (in this case, the first responded, which is essentially the abcViewController). Think of this as a one-way path; all it is does is tell these controls (the button and text field) where they should send a message when it’s time to, because and event happened. So when the button get’s clicked, it has a built in behavior of sending a message somewhere, if it’s connected. You’ve connected it to the goPressed: action on abcViewController, so that’s what it does.

    The other side of the coin is making sure the view controller can send messages back to the controls. That’s what outlets are for. It doesn’t sound like you’ve set up any outlets, so the abcViewController has no way of sending a message to the image view that it should show up, or change it’s image, or anything.

    First thing you should do is define your properties as IBOutlets also, so like:

    @property (noatomic, retain) IBOutlet UITextField *code;
    

    Then when you go back to Interface Builder, if you go to the connections tab of the inspector, when the First Responder is selected, you will see it list out all of it’s outlets. You will want to connect (drag from the dot) the outlet on the first responder (abcViewController) to the corresponding view. This creates a path from the view controller to the view (the opposite of what you did with the action).

    Once that’s done, if you tell the object to do something in your code, that message will get shuttled along to the object that gets created from the XIB when your view gets loaded up.

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

Sidebar

Related Questions

I am creating a project with Xcode 4.2 and using it's storyboard. In one
I'm creating an iphone app using xcode 4.2, and trying to use the AVFoundation
I am currently creating an iPhone app using Xcode 4.0.2, I want the app
I am creating an iPad app using the master-detail template available in Xcode 4.3.
I'm creating and app that will rely on a database, and I have all
I am creating an app which will have a question in a UILabel and
How to build Sandboxed app without XCode? I mean I'm using gcc Make to
I am creating an iPad app. I do not yet have the $99 dev
Possible Duplicate: xcode 4.2 soundboard? Hi I'm creating a soundboard for my iPhone app
I've been tasked with creating an IM app for IOS. I currently have an

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.