我想要覆盖我的图像与几个Rectangle(),这应该回应手势(如点击或拖动)。然而,我发现当我清除矩形时,它就停止接收手势了。
Rectangle()
.fill(.clear)
.gesture(
LongPressGesture()
.onEnded { value in
// this isn't called when the rectangle fill is .clear
}
)
有没有办法让一个无形的元素接收水龙头?我知道,我可以给它1%的不透明度,但这感觉像一个丑陋(和可见的)传说。
我有两个滚动视图,一个在另一个里面,我想先滚动我的主滚动视图内容,然后我只想滚动子视图滚动
CGFloat scrollOffset = texscrl.contentOffset.y;
if (scrollOffset == 0)
{
//This condition will be true when scrollview will reach to bottom
self.ArtistScroll.scrollEnabled=YES;
texscrl.scrollEnabled=YES;
}else
{
self.ArtistScro