0
votes

Hi I have following function in a file i want to call it inside another method of same class the second

  • (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // Issue vibrate AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

    // Also issue visual alert UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Screen Touched!" message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil]; [alert show]; }

i want to call it inside another method of same class the second function is called with the button press the second method is

-(IBAction)resetBet:(id)sender { //call function here.... //some code...... } Basically what i am tring to do is to make device vibrate when button click please tell me how to call the function.

2

2 Answers

0
votes

[self resetBet:nil];

should call the resetBet method.. or you can use an object like a button instead of the "nil". Hope that's what you meant..

0
votes

Do what stackr said :D or use a selector.