0
我是iPhone開發和Objective-C的新手,所以如果已經有人問我這個問題,我一直在研究一些代碼,並且一次又一次地出現這個錯誤彈出告訴我預期的標識符或「(」預期之前NSInteger的。預期的標識符或'('在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
它給了我另一個錯誤,告訴我我不能使用一個對象作爲方法的參數。 – user1359673 2012-04-26 20:38:45
不要緊,謝謝你的快速回復傢伙,非常感謝,解決了。 – user1359673 2012-04-26 20:40:06
將答案標記爲正確答案 – Mario 2012-04-26 20:48:34