我没有足够的声誉来发布图片.. 所以希望你能帮助我解决这个问题。在第三行说“@implementation viewcontroller”我的xcode告诉我这个“@end在实现上下文中丢失”提前谢谢!
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
mainInt = 0;
randomMain = [NSTimer scheduledTimerWithTimeInterval:(1.0/1.0) target:self selector:@selector(randomMainvoid) userInfo:nil repeats:YES];
}
- (void)randomMainvoid {
mainInt +=1;
label.text = [NSString stringWithFormat:@"%d", mainInt];
}
- (IBAction)Start {
[startButton setHidden:YES];
timer = [NSTimer scheduledTimerWithTimeInterval:(0.0088) target:self selector:@selector(onTimer) userInfo:nil repeats:YES];
pos = CGPointMake(5.0, 6.0);
}