Application Menu Items Xcode

喜夏-厌秋 提交于 2019-12-06 16:00:47

basically you need to declare you actions/functions as IBActions so you can link them in the Interface Builder.

for example, you declare you functions like:

-(IBAction) doSomething:(id)sender{
 //do something code here
}

The IBAction is really just a nil, but it tells the Interface builder that this is available for linking. The (id)sender tells XCode which object triggered the action.

Hard to explain without screenshots, but here is a quick tutorial for you: http://juliuspaintings.co.uk/cgi-bin/paint_css/animatedPaint/002-MenuApp.pl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!