Re: noob: Question about senders and views
Re: noob: Question about senders and views
- Subject: Re: noob: Question about senders and views
- From: Craig Williams <email@hidden>
- Date: Wed, 8 Apr 2009 11:27:37 -0600
On Apr 8, 2009, at 11:08 AM, Eric E. Dolecki wrote:
I have a tab bar and it's driven by FirstViewController. I have a
second
view with it's own xib. I can have buttons there call into a
"buttonPress"
method I have in the FirstViewController. I am able to get the
sender tag
easily.
NSLog(@"id: %d", [sender tag] );
However in the second xib I have a text field that I want to
populate with a
string. Since the buttonPress method in the FirstViewController
doesn't know
about the UILabel in the SecondViewController, how can I have it set
that
field?
Eric
Have you considered sending the string along with the button click
call and having
the SecondViewController populate its own text field?
-(IBAction)buttonClicked:(id)sender
{
[secondViewController populateTextFieldWithString:@"TextField String"];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden