我是 iPhone 开发和 Objective-C 的新手,如果有人问过这个问题,请原谅。我一直在处理一些代码,并且一次又一次地,这个错误不断弹出,告诉我一个预期的标识符或'('在预期 NSInteger 之前。
#import "tableTutViewController.h"
@implementation tableTutViewController;
(NSInteger)tableView:(UITableView)tableView numberOfRowsInSection:(NSInteger)section{
return tutorials.count;
}
- (void)viewDidLoad {
NSString * theFile = [[NSBundle mainBundle]
pathForResource:@"TPL" ofType:@"plist"];
tutorials = [[NSArray alloc] initWithContentsOfFile:theFile];
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end