Ok, it may be a dumb mistake. But I can’t figure out what xcode wants from me.
So here is the header file
#import <Foundation/Foundation.h>
#import "TableViewController.h"
@end
@interface Settings : NSObject
- (id)init: (TableViewController*) TableControll;
@end
If there is no @end before interface it says expected identifier or (, and suggests adding @end there. If there is an @end it says end must appear in objective-c contex.
Ideas?
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMessageComposeViewController.h>
@interface TableViewController : UIViewController<UITableViewDataSource,UITableViewDelegate,MFMessageComposeViewControllerDelegate>
{
ControllerType controllerType;
}
@property (retain, nonatomic) IBOutlet UITableView *tableView;
@property (retain, nonatomic) NSArray *dataArray;
@property (retain, nonatomic) NSArray *imageArray;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil andType:(ControllerType)type;
@end
You have a
@endbefore the@interfacedeclaration in yourSettings.hfile.It should read:
Also, you haven’t included the
#importdirective forControllerTypein yourTableViewController.hwhich may be why you’re getting obscure errors in yourSettings.hfile.