Solved

iPhone app training

Posted on 2013-01-08
6
302 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
  • 3
  • 2
6 Comments
 
LVL 14

Assisted Solution

by:binaryevo
binaryevo earned 130 total points
Comment Utility
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 130 total points
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 11

Expert Comment

by:Deepak Lakkad
Comment Utility
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
Comment Utility
no error found.

tried to press F6 but no help
0
 
LVL 1

Author Comment

by:KANEWONG
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I recently went through the process of creating an installable image of an iPhone mobile app (an .ipa file) that beta testers could load onto their test devices. The process involved quite a few steps, but both Appcelerator and Diawi.org had decent …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now