Cel C - Błąd: „Oczekiwany typ”
Dostaję bardzo dziwny błąd w czymś, co uważałbym za proste.
#import <Foundation/Foundation.h>
#import "ViewController.h"
#import "GameObject.h"
@interface GameController : NSObject
@property (strong) GLKBaseEffect * effect;
@property (strong) NSMutableArray * gameObjects;
@property (strong) NSMutableArray * objectsToRemove;
@property (strong) NSMutableArray * objectsToAdd;
+ (GameController *) sharedGameController;
- (void) tick:(float)dt;
- (void) initializeGame: (ViewController*) viewcontroller;//ERROR: EXPECTED A TYPE
- (void) createObject:(Class) objecttype atPoint:(CGPoint)position;
- (void) deleteObject:(GameObject*) object atPoint:(CGPoint)position;
- (void) manageObjects;
@end
Dlaczego miałoby kwestionować, czy „ViewController” jest typem? To klasa, którą poprawnie zaimplementowałem. Został również zaimportowany.
EDYTOWAĆ*
Oto klasa ViewController.m, jeśli to pomaga.
#import "ViewController.h"
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[[GameController sharedGameController] initializeGame:self];
}
@end
EDYCJA 2**
i plik ViewController.h
#import <GLKit/GLKit.h>
#import "GameController.h"
@interface ViewController : GLKViewController
@end