任何人都知道如何解决“viewDidUnload 未声明”问题问题?
以及如何解决“预期的”;“在 '{' 标记之前?下面的代码(来自 xcode 3.2.3)
- (void)viewDidUnload {
self.cheatName = nil;
self.description = nil;
}
两个错误都在第一行
- (void)viewDidLoad {
[super viewDidLoad];
[self.titleLabel setText:self.title];
[self.descriptionLabel setText:self.description];
float textHeight = [MLUtils calculateHeightOfTextFromWidth:self.description : descriptionLabel.font :descriptionLabel.frame.size.width :UILineBreakModeWordWrap];
CGRect frame = descriptionLabel.frame;
frame.size.height = textHeight;
descriptionLabel.frame = frame;
CGSize contentSize = descriptionScrollView.contentSize;
contentSize.height = textHeight;
descriptionScrollView.contentSize = contentSize;
- (void)viewDidUnload {
self.cheatName = nil;
self.description = nil;
}
And also how to solve an "expected ';' before '{' token? code below (from xcode 3.2.3)
- (void)viewDidUnload {
self.cheatName = nil;
self.description = nil;
}
Both errors are in the first line
- (void)viewDidLoad {
[super viewDidLoad];
[self.titleLabel setText:self.title];
[self.descriptionLabel setText:self.description];
float textHeight = [MLUtils calculateHeightOfTextFromWidth:self.description : descriptionLabel.font :descriptionLabel.frame.size.width :UILineBreakModeWordWrap];
CGRect frame = descriptionLabel.frame;
frame.size.height = textHeight;
descriptionLabel.frame = frame;
CGSize contentSize = descriptionScrollView.contentSize;
contentSize.height = textHeight;
descriptionScrollView.contentSize = contentSize;
- (void)viewDidUnload {
self.cheatName = nil;
self.description = nil;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您缺少右括号:
其次,我不确定此行是否有效:
我认为您必须添加参数名称,例如(虚构名称!):
Your are missing a closing bracket:
Second, I am not sure whether this line is valid:
I think you have to add the parameter names like (fictive names!):
通常这意味着您在该线上方的某个位置有错误。或者放错了{}。
usually that means that you have an error somewhere above that line. Or misplaced { }.