我收到一些警告,說明某些東西可能不會響應某個函數。Xcode - 某些東西可能不會響應
#import "Lane.h"
#import "TrafficController.h"
@implementation Lane
@synthesize controller;
-(void)awakeFromNib
{
[controller registerLane:self]; -- 'TrafficController' may not respond to '-registerlane'
srandom(time(NULL));
[self start];
}
-(void)start
{
long newStartTime = random() % 200;
carStartTimer = [NSTimer scheduledTimerWithTimeInterval:newStartTime/1000.0 target:self selector:@selector(startTimerFired:) userInfo:nil repeats:YES];
[carStartTimer retain];
}
-(void)startTimerFired: (NSTimer*)timer
{
//pick a random number of milliseconds to fire again at
long newStartTime = random() % 1500 + 500;
[timer setFireDate:[NSDate datewWithTimeIntervalSinceNow:newStartTime/1000.0]];
[controller startCarFromLane:self]; - 'TrafficController' may not respond to '-startCarFromLane'
NSLog(@"Starting new car");
}
-(void)stop
{
[carStartTimer invalidate];
[carStartTimer release];
carStartTimer = nil;
}
@end
這是否意味着這些函數沒有在這個或其他頭文件中聲明?或者這意味着什麼?
不,但我的TrafficController.m文件很難。 – Amacoder 2011-02-14 12:25:02