?
Solved

iPhone app training

Posted on 2013-01-08
6
Medium Priority
?
312 Views
Last Modified: 2013-01-10
Hi;

I am learning to code a simple iPhone app but I got stuck, pls help to solve my problem.

Suppose, when I type my message in the text box and press the "Press Here" button, it should show what I typed in the "label" area but it did not.

It stopped at the breakpoint.  Pls see my snapshot.
Screen-Shot-2013-01-08-at-11.02..png
0
Comment
Question by:KANEWONG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Assisted Solution

by:binaryevo
binaryevo earned 520 total points
ID: 38758332
It appears that you have everything setup correctly.  Hmmmm, the problem most likely resides with that UILabel not being wired up correctly in interface builder.  Are you using storyboards or xibs?  That does determine how you set it up.


Xib wireup:  http://bynomial.com/blog/?p=5
Storyboard wireup: http://klanguedoc.hubpages.com/hub/IOS-5-A-Beginners-Guide-to-Storyboard-Connection

Hope this helps
0
 
LVL 11

Accepted Solution

by:
Deepak Lakkad earned 520 total points
ID: 38758663
add following code

@synthesize textBox;
@synthesize label;

after

@implementation ViewController

And change following line of code

NSString *Output = Nil;

with

NSString *Output;

I think this will solve the problem

- Deepak Lakkad
0
 
LVL 1

Author Comment

by:KANEWONG
ID: 38762008
Hi;

per Deepak instruction, I add two commands to declare textBox and label

@synthesize textBox;
@synthesize label;

also, I have tried the xib wire up

but still no luck.file owner
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 38762089
Do you get any error message?

If yes, what is that?

If No, Just stopped on breakpoint - Press F6 to execute next step

- Deepak Lakkad
0
 
LVL 1

Author Comment

by:KANEWONG
ID: 38765876
no error found.

tried to press F6 but no help
0
 
LVL 1

Author Comment

by:KANEWONG
ID: 38765896
OK.

after changing (bool) to (BOOL) as below, my simple app work as expected with your guys suggestion.

- (BOOL)textFieldShouldReturn:(UITextField *)theTextField{
    [textBox resignFirstResponder];
    return YES;
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Basics of Storyboard Storyboards were first introduced to developers in the release of iOS 5. They save the developer the trouble of designing each screen’s interface in a different file. The storyboard allows you to see the conceptual mockup o…
How to take pictures with depth using iOS 10
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question