Buttons are not working on bottom of iPhone5

主宰稳场 提交于 2019-12-08 06:23:57

问题


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.



来源:https://stackoverflow.com/questions/15331725/buttons-are-not-working-on-bottom-of-iphone5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!