Iphone UIButton not working in nested UIViews

前端 未结 6 2031
醉梦人生
醉梦人生 2021-01-17 14:43

This is so damn simple im sure! Im missing something and im exhausted from trying to fix it. hopefully someone can help.

The Button in CharacterView.m works but the

6条回答
  •  情歌与酒
    2021-01-17 15:05

    Another thing to consider is that UIButton subviews that have been added a UIImageView don't work at all. You need to create a UIView that you add both the image view and the buttons to.

    This is probably because interaction is turned off by default on image views, but I've not checked this.

提交回复
热议问题