简体   繁体   中英

UIView inside a UIButton

I have to add a button. This should be glowing non stop. So I used an external library. By this I have to add the image to an UIImageView and then the imageview to the view. This is added to the button. The glow is enabled by the startGlow: method which takes in a UIView. This forces me to add the UIView to the UIButton. The problem comes in when I touch the button, it is not responsive inside which is filled with UIView. The edges seems to work fine. Any fix for this? I want the button to be responsive for all the TouchInside event. Thank you

If you don't need to interact with a view you can turn off the interaction by setting the userInteractionEnabled property to NO. You should then be able to interact with the view or UIButton below it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM