ImadUI is a Swift package containing a SwiftUI controls, for now it just contains a RulerSlider, I will try to
update it as I can with any UI i think will be usefull to the comunity :
## Installation
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/ibo2001/ImadUI", .upToNextMajor(from: "0.1.0")),
],
Before using anything be sure to
import ImadUIin the target swift file.
@State private var selectedValue: Double = 1.0
@State private var isLoading: Bool = true
@State private var isLoading: Bool = true
@State private var selectedPage: Int?
@State private var text: String = ""
var body: some View {
...
// RulerPicker
RulerPicker(selectedValue:$selectedValue,
in range: ClosedRange<Double> = 0.5...3.5,
tickPosition:VerticalAlignment = .center,
minorTickHeight: CGFloat = 12,
tickColor: Color = .secondary,
majorTickColor: Color = .primary,
indicatorColor: Color = Color(.tintColor)
...
// RainbowOverlay
.overlay{
if isLoading {
RainbowOverlay(
radius: 70,
rainbowWidth: 50,
blurRadius: 20,
animationDuration: 5
)
}
}
...
// PagesPicker
VStack {
Text(text)
.foregroundColor(.red)
.contentTransition(.numericText())
.font(.system(size: 20, weight: .bold, design: .default))
PagesPicker(selectedValue:$selectedPage,in: 1...604,
pageImage: Image(systemName: "person"),pageFillingColor: .green.opacity(0.2))
.frame(height: 40)
if let selectedPage {
Text(String(format: "%d", selectedPage))
.foregroundColor(.red)
.contentTransition(.numericText())
.font(.system(size: 20, weight: .bold, design: .default))
}
}
.onChange(of: selectedPage) {
if let selectedPage {
text = String(format: "Page number %d", selectedPage)
}
}
.onAppear {
selectedPage = 1
}
}=======
This code is distributed under the terms and conditions of the MIT license.



