![](/img/trans.png)
[英]UIControl not recognizing tap inside table view cell, stopped working from iOS 14
[英]Tap not working if SVG Image inside UIControl
我正在Swift 4 中編寫一個iOS 應用程序。
我需要一個帶有SVG 圖像的自定義按鈕。
因此,我在 Storyboard 場景中添加了UIView > 將其更改為UIControl作為自定義類 > Traits : Button和User interaction Enabled 。 然后我在其中添加了SVGView ( Macaw ),Constraints 0,0,0,0 並取消選中它的所有特征。
問題是這個按鈕沒有采取任何點擊(TouchUpInside)手勢。
檢查是否為圖像啟用了用戶交互?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.