Buttons are not working on bottom of iPhone5

2019-06-02 17:46发布

问题:

In my iPhone app,I have used an overlay on the camera. I have 3 buttons on bottom-capture,flash,cancel All working fine on iPhone 3.5" devices.I have changed the Y position for all according to iPhone 5.Buttons are at proper positions.But none of them are working

I have place brake point to each actions,they are not being called. Trying for last 3 hours-but could not figure out the issue.

Any help ?

EDIT I am adding all my buttons to the overlay in this

-(id)initWithFrame:(CGRect)frame {
  if (self = [super initWithFrame:frame]) {
   }
  }

回答1:

As per my understanding your buttons are out of it's parent view's bounds. Hence they are not responding to touch events. You need to make sure that all buttons are in parent view's bounds. You need to increase parent view's bounds area to accomodate buttons. Try increasing height of parent view of buttons.



回答2:

Well i have been through this issue..you will have to change the frames for OverlayView Camera..if you are adding a UIView then change its frames when you allocating it or else if you are using Image Picker Controller then change its frame size.

This should help you.

Let me know if have any queries.