Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by@Ramotion

License

NotificationsYou must be signed in to change notification settings

Ramotion/fluid-slider

Repository files navigation

FLUID SLIDER

A slider widget with a popup bubble displaying the precise value selected written on Swift.


We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:

Inspired byVirgil Panashot


TwitterCarthage compatiblecodebeat badgeDonate

Requirements

  • iOS 10.0
  • Xcode 9
  • Swift 4.0

Installation

You can installfluid-slider in several ways:

  • Add source files to your project.

pod'fluid-slider'

github "Ramotion/fluid-slider"

Usage

Slider

import fluid_slider

The slider can be inserted in a view hierarchy as a subview. Appearance can be configured with a number of public attributes:

letslider=Slider()slider.attributedTextForFraction={ fractioninletformatter=NumberFormatter()    formatter.maximumIntegerDigits=3    formatter.maximumFractionDigits=0letstring= formatter.string(from:(fraction*500)asNSNumber)??""returnNSAttributedString(string: string)}slider.setMinimumLabelAttributedText(NSAttributedString(string:"0"))slider.setMaximumLabelAttributedText(NSAttributedString(string:"500"))slider.fraction=0.5slider.shadowOffset=CGSize(width:0, height:10)slider.shadowBlur=5slider.shadowColor=UIColor(white:0, alpha:0.1)slider.contentViewColor=UIColor(red:78/255.0, green:77/255.0, blue:224/255.0, alpha:1)slider.valueViewColor=.whiteview.addSubview(slider)

Take a look at theExample project for an integration example.

SinceSlider is a subclass ofUIControl, it inherits target-action mechanics and it's possible to listen for user-triggered value changes:

slider.addTarget(self, action: #selector(sliderValueChanged), for:.valueChanged)

Tracking Behavior

There are a couple of callbacks which allow you to listen to the slider's tracking events:

vardidBeginTracking:((Slider)->())?vardidEndTracking:((Slider)->())?

Animation Performance

This control is designed to use device CPU resources with care. The fluid-style animation will be disabled when low power mode is enabled or the system is under heavy load.

This library is a part of aselection of our best UI open-source projects.

🗂 Check this library on other language:

📄 License

Fluid Slider is released under the MIT license.SeeLICENSE for details.

This library is a part of aselection of our best UI open-source projects.

If you use the open-source library in your project, please make sure to credit and backlink tohttps://www.ramotion.com/

📱 Get the Showroom App for iOS to give it a try

Try this UI component and more like this in our iOS app. Contact us if interested.

About

:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by@Ramotion

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp