【发布时间】:2010-12-10 10:30:43
【问题描述】:
嗨 我在一个文件中有以下函数,我想在第二个相同类的另一个方法中调用它
-
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // 发出振动 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
// 同时发出视觉警报 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"屏幕被触动了!" 消息:无 代表:无 取消按钮标题:无 otherButtonTitles:@"OK", nil]; [警报显示]; }
我想在同一个类的另一个方法中调用它第二个函数是用按钮调用第二个方法是
-(IBAction)resetBet:(id)sender { //这里调用函数...... //一些代码...... } 基本上我要做的是让设备在按钮单击时振动 请告诉我如何调用该函数。
【问题讨论】:
标签: objective-c