[英]Adding a button to an image view present in a stack view
I am trying to add a button to an image view which lies in a stack view. 我试图将按钮添加到位于堆栈视图中的图像视图。 But whenever I try to add the button after adding the image view, the stack view gets divided into two parts, one housing the button and the other housing the image view. 但是,每当我尝试在添加图像视图之后添加按钮时,堆栈视图都会分为两部分,一个包含按钮,另一个包含图像视图。
I want to add an icon which is an image view, on top which there's a button which one clicked does the needful. 我想添加一个图标,它是图像视图,在其顶部有一个按钮,单击该按钮可以完成必要的操作。
代替使用按钮,首先添加一个uiview代替按钮,然后在uiview中添加图像和按钮。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.