Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
el control deslizante se mueve hacia arriba cuando uso HStack

El control deslizante se mueve hacia arriba cuando uso HStack, VStack funciona bien, ¿alguna idea?

 struct LockerSlider<V>: View where V : BinaryFloatingPoint, V.Stride : BinaryFloatingPoint { var body: some View { GeometryReader { proxy in ZStack(alignment: .leading) { RoundedRectangle(cornerRadius: 15) .frame(height: 30) RoundedRectangle(cornerRadius: 15) .frame(width:(proxy.size.width - 30) * ratio + 30,height: 30) Circle() .frame(width: 50, height: 50) .offset(x: (proxy.size.width - 30) * ratio) .gesture(DragGesture(minimumDistance: 0) .onChanged({ updateStatus(value: $0, proxy: proxy) }) .onEnded { _ in startX = nil } .frame(height: 30) .simultaneousGesture(DragGesture(minimumDistance: 0) .onChanged({ update(value: $0, proxy: proxy) })) .onAppear { ratio = min(1, max(0,CGFloat(value / bounds.upperBound))) } } } }
 HStack{ Text("Custom Slider") LockerSlider(value: $number, in: 0...1050000, step: 0.02, length: 15,ball: 30, onEditingChanged: { _ in print("111") }) }

cuando uso HStack, el control deslizante se mueve hacia las áreas superiores y me falta algo.

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!