0
簡單test--爲什麼會導致「exc_bad_access」錯誤?
- (void)viewDidLoad
{
[super viewDidLoad];
NSDate *date1 = [NSDate date];
NSDate *date2 = [NSDate dateWithTimeIntervalSinceNow:3];
NSTimeInterval timeBetween = [date1 timeIntervalSinceDate:date2];
NSLog(@"between: %@",timeBetween);
}
它得到了一致的錯誤 「NSTimeInterval ......」
程序接收到的信號: 'EXC_BAD_ACCESS'
你能告訴我哪裏錯了?