Solved

iPhone app training

Posted on 2013-01-08
6
306 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
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 130 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

     Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON (https://github.com/SwiftyJSON/SwiftyJSON). If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
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.

863 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

28 Experts available now in Live!

Get 1:1 Help Now