3

My Application works on every device except some iPhone 6s. When user tries to tap on buttons nothing happens. I checked Buttons frames and everything is right but still nothing happens when user taps on buttons. I think this is something touch related. Any kind of help here will be appreciated. Thanks.

BhushanVU
  • 3,455
  • 1
  • 24
  • 33
  • can you add code related to that button? – Ronak Chaniyara Feb 24 '16 at 10:06
  • It's happening on every button irrespective of what code I add. Still you can check code below: button pressed method - UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; NSString *identifierStr; identifierStr = @"BTRegistrationLandingViewController"; BTRegistrationLandingViewController *registrationStepOneVC = [storyboard instantiateViewControllerWithIdentifier:identifierStr]; [self.navigationController pushViewController:registrationStepOneVC animated:YES]; – BhushanVU Feb 24 '16 at 10:10
  • check your outlets, actions in storyboard or xib, are they proper? – Ronak Chaniyara Feb 24 '16 at 10:13
  • Yes that's the first thing I checked – BhushanVU Feb 24 '16 at 10:14
  • Please check if the button is having a 3D Touch Enabled . – sourav Feb 24 '16 at 10:14
  • Most likely you have an issue with your constraints. ill defined or missing constraints can manifest themselves this way. – MDB983 Feb 24 '16 at 10:16
  • @sourav How do we check if UIButton has 3D touch enabled? – BhushanVU Feb 24 '16 at 10:18
  • You can check in you code , weather you have added it or not . – sourav Feb 24 '16 at 10:23
  • No I haven't added any 3D touch, also there is no constraints exceptions. – BhushanVU Feb 24 '16 at 10:26
  • If you use http://stackoverflow.com/questions/25963257/how-to-get-the-3d-view-of-ui-in-xcode-6 do you see something above your buttons that could intercept the touch? – Larme Feb 24 '16 at 10:43
  • @Larme ; I checked view debugger, there is nothing above button. And to be sure I enable 'Highlight on Touch' property of UIButton. I can clearly see button is getting highlighted on touch but nothing happens – BhushanVU Feb 24 '16 at 10:47
  • Just now I noticed when you press very gently then it works but not on normal button touches like in other devices. – BhushanVU Feb 24 '16 at 10:55

1 Answers1

1

If you have used any UIButton Category and Overrides the Touch methods then try adding:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
        [super touchesBegan:touches withEvent:event];
}


- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
        [super touchesMoved:touches withEvent:event];
}

-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
        [super touchesEnded:touches withEvent:event];
}
Suhas Arvind Patil
  • 1,732
  • 1
  • 19
  • 31