using textfield of second view in first view
<p>I'm making a client-server program for iphone and i want to use my serverIP which is a part of my second view in the first view serverIP is a uitextfield. i use to enter the value of ServerIP in second View but i want to use the value of serverIP IN Firstview. </p>

<p>""secondview.h"" interface file</p>

<pre><code>#import &lt;UIKit/UIKit.h&gt;


@interface secondview : UIViewController {

    IBOutlet UIView *view;
    IBOutlet UITextField *serverIP;
    IBOutlet UITextField *noc;
    IBOutlet UIButton *save;
    IBOutlet UIButton *back;
    IBOutlet UIButton *load;
     IBOutlet UILabel *display1;
}

-(IBAction) back;
-(IBAction) save;
-(IBAction) load;

@property (nonatomic,retain) IBOutlet UITextField *serverIP; 
@property (nonatomic,retain) IBOutlet UITextField *noc;
@property (nonatomic , retain) IBOutlet UILabel *display1;


@end
</code></pre>

<p>""secondview.m"" implementation file</p>

<pre><code>#import "secondview.h"


@implementation secondview


@synthesize serverIP,noc,display1;


-(IBAction) save{

    [[NSUserDefaults standardUserDefaults] setInteger:serverIP forKey:@"save"]; 

    NSUserDefaults *myname = [NSUserDefaults standardUserDefaults];



    [serverIP resignFirstResponder];



}

-(IBAction) load {

    serverIP = [[NSUserDefaults standardUserDefaults] integerForKey:@"load"];

    NSUserDefaults *myname = [NSUserDefaults standardUserDefaults];





}


-(IBAction) back {

    [self.parentViewController dismissModalViewControllerAnimated: YES];
}



- (void)dealloc {
    [super dealloc];
}


@end
</code></pre>
