简体   繁体   中英

Tap not working if SVG Image inside UIControl

I am writing an iOS App in Swift 4 .

I need a custom button with SVG image inside it.

So, I added UIView in Storyboard scene > Changed it to UIControl as custom class > Traits : Button and User interaction Enabled . Then I added SVGView ( Macaw ) inside it, Constraints 0,0,0,0 and unchecked all of its traits.

The issue is this button isn't taking any tap (TouchUpInside) gestures.

检查是否为图像启用了用户交互?

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