ok, this may be a very basic question and I apologise if it is, but its driving me mad and I really need to get a better understanding.
I have an app that I am developing and using a new view controller and xib file for each page.
I call each page by using this code:-
HelpVC = [[[HelpViewController alloc] initWithNibName:@"HelpViewController" bundle: [NSBundle mainBundle]]autorelease];
[self presentModalViewController:HelpVC animated:YES];
Which works great.
However if I have this declared in a file and I then want to call it somewhere else I am getting errors all over the place.
is there any way to initialise all the xib files first in a class file and then call them from that file when needed??
Thanks
This is the error I get back
error: expected specifier-qualifier-list before 'UserInputViewController'
It seems to cause all of my declarations in the .h file to error with the message above.
Some sample code is:-
.h file
#import <UIKit/UIKit.h>
#import "CgePWViewController.h"
#import "LogBackInViewController.h"
#import "LoginViewController.h"
@interface SettingsViewController : UIViewController
{
CgePWViewController *cPWVC;
LogBackInViewController *LBIVC;
LoginViewController *login;
}
@property(nonatomic, retain) CgePWViewController *cPWVC;
@property(nonatomic, retain) LogBackInViewController *LBIVC;
@property(nonatomic, retain) LoginViewController *login;
so basically as soon as I have added in LoginViewController it causes everything else to error, if I take this out then the app runs perfectly.