运行GLPaint示例的警告

时间:2012-03-23 00:56:41

标签: xcode ios5 warnings

我查看了与Apple的GLPaint示例相关的其他问题。也许我做错了什么。我收到了这些警告:

Unused parameter 'touches'
Unused parameter 'touches'
Unused parameter 'touches'
Unused parameter 'touches'
Unused parameter 'event'

Unused parameter 'motion'
Unused parameter 'event'
Unused parameter 'event'
Unused parameter 'motion'
Unused parameter 'event'
Unused parameter 'sender'

它们所在位置的示例位于PaintingView.m文件中,方法为:

(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

示例运行但是当我根据我的需要修改它时,我想了解它们的含义以及如何修复它们。

非常感谢

1 个答案:

答案 0 :(得分:2)

警告

  

未使用的参数'触动'

表示方法内未使用参数touches。例如:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
     // some code where the parameter touches is not used
}

最后,请注意您可以通过将以下屏幕截图中突出显示的值更改为来停用这些警告(这是默认设置)。

enter image description here