mirror of
git://jb55.com/damus
synced 2024-09-19 11:43:44 +00:00
ui: make ImageView's tab indicator dots tappable
Changelog-Changed: Make carousel tab dots tappable Signed-off-by: Bryan Montz <bryanmontz@me.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
8dad8e6703
commit
0803594553
@ -24,6 +24,9 @@ struct ImageView: View {
|
|||||||
Capsule()
|
Capsule()
|
||||||
.fill(index == selectedIndex ? Color(UIColor.label) : Color.secondary)
|
.fill(index == selectedIndex ? Color(UIColor.label) : Color.secondary)
|
||||||
.frame(width: 7, height: 7)
|
.frame(width: 7, height: 7)
|
||||||
|
.onTapGesture {
|
||||||
|
selectedIndex = index
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
|
Loading…
Reference in New Issue
Block a user