jasudev / axissegmentedview Goto Github PK
View Code? Open in Web Editor NEWA library that allows you to easily create various styles of segmented views. Supports iOS, macOS and tvOS.
License: MIT License
A library that allows you to easily create various styles of segmented views. Supports iOS, macOS and tvOS.
License: MIT License
Is item adaptive sizing supported? Not equal item size, thank you!
first of all, amazing work. The only question is can we use this segment view as tab view? is it possible?
When using the segmented view with style of ASLineStyle
, the blue bottom selected line indicator does not move to the selected segment when tapping on any of the segments. This issue only happens on ios 14.x. Note that selection is actually happening and there is the haptic feedback and even the onTapReceive
event is triggered properly. It's just the blue line always stays on the first segment and does not move at all.
@State private var selection: Int = 0
var body: some View {
VStack {
AxisSegmentedView(selection: $selection, constant: ASConstant(divideLine: .init(color: Color.blue, scale: 0))) {
Image(systemName: "iphone")
.itemTag(0) {
Image(systemName: "iphone")
}
Image(systemName: "ipad.landscape")
.itemTag(1) {
Image(systemName: "ipad.landscape")
}
Image(systemName: "laptopcomputer")
.itemTag(2) {
Image(systemName: "laptopcomputer")
}
Image(systemName: "applewatch")
.itemTag(3) {
Image(systemName: "applewatch")
}
} style: {
ASLineStyle(lineColor: .blue,
lineSmallWidth: 2,
lineLargeScale: 1,
lineEdge: .bottomTrailing,
movementMode: .normal)
}
onTapReceive: { selectionTap in
}
.font(.system(size: 20))
.frame(width: 320, height: 44)
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.