How to simulate simultaneous button touch in ios Simulator -


i have 2 buttons on screen , 1 on left , 1 on right , wanted know if there way in ios simulator me simulate both buttons being pressed @ same time.i tried pressing alt on simulator result 2 circles appear. can position 1 circle first button on left not sure how position next circle on right button.

once have 2 circles (using alt key), move circles together, hold shift key: allow move 2 circles anywhere on simulator screen.

then let go key , click.

i tried code:

-(void)taptwo:(uitapgesturerecognizer*)recognizer {     cgpoint p1 = [recognizer locationoftouch:0 inview:self.view];     cgpoint p2 = [recognizer locationoftouch:1 inview:self.view];     nslog(@"points: %@ , %@",nsstringfromcgpoint(p1),nsstringfromcgpoint(p2)); }  - (void)viewdidload {     [super viewdidload];     uitapgesturerecognizer* r = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(taptwo:)];     r.numberoftouchesrequired = 2;    [self.view addgesturerecognizer:r]; } 

and worked expected.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -