switching views in iphone
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6027281/switching-views-in-iphone">switching views in iphone</a>  </p>
</blockquote>



<p>I am making a client server program in which i want to switch from one view to another but i am getting an error in "clientserverprogram view.m" plz help.i also asked same question five hours ago but the answer was not satisfactory again same error is pertaining.</p>

<p>"clientserverprogram view.h" </p>

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

@class secondview;

@interface clientserverprogramViewController : UIViewController {

    IBOutlet UITextField *name;
    IBOutlet UITextView *filepath;
    IBOutlet UIButton *print;
    IBOutlet UIButton *settings;
    IBOutlet UIButton *cancel;
    IBOutlet UILabel *display;
    IBOutlet secondview *secondview;
}

-(IBAction) print;
-(IBAction) settings;
-(IBAction) cancel;

@property (nonatomic , retain) IBOutlet UITextField *name;
@property (nonatomic , retain) IBOutlet UITextView *filepath;

@property (nonatomic , retain) IBOutlet UILabel *display;
@end
</code></pre>

<p>"clientserverprogram view.m"</p>

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

@implementation clientserverprogramViewController

@synthesize  name ,filepath,display ;

-(IBAction) print {

    NSString *str = name.text;

    [display setText : str];

}

-(IBAction) settings {

    [self presentModalViewController: secondview animated: YES ];

"" error: expected expression before 'secondview'"" 


}

-(IBAction) cancel {

    exit(0);
 }

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

@end


"secondview.h"


#import &lt;UIKit/UIKit.h&gt;

@interface secondview : UIViewController {

    IBOutlet UIView *view;

    IBOutlet UIButton *back;

}

-(IBAction) back;

@end


""secondview.m""

#import "secondview.h"

@implementation secondview

  -(IBAction) back {

    [self.parentViewController dismissModalViewControllerAnimated: YES];
}

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

@end
</code></pre>
