exyte/ActivityIndicatorView
关于
一组使用 SwiftUI 创建的预设加载指示器
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- +2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
ActivityIndicatorView
A number of preset loading indicators created with SwiftUI
Usage
Create an indicator like this:
ActivityIndicatorView(type: .default)
wheretype - value from ActivityIndicatorView.IndicatorType enum
You may alter it with standard SwiftUI means like this:
ActivityIndicatorView(type: .default)
.frame(width: 50.0, height: 50.0)
.foregroundColor(.red)
Or specify another indicator type:
ActivityIndicatorView(type: .growingArc(.red, lineWidth: 4))
.frame(width: 50.0, height: 50.0)
Indicator types
Each indicator type has a number of parameters that have reasonable defaults. You can change them as you see fit, but it is advised to not set them too high or too low.
default - iOS UIActivityIndicator style
.default(count: 8)
arcs
.arcs(count: 3, lineWidth: 2)
rotatingDots
.rotatingDots(count: 5)
flickeringDots
.flickeringDots(count: 8)
scalingDots
.scalingDots(count: 3, inset: 2)
opacityDots
.opacityDots(count: 3, inset: 4)
equalizer
.equalizer(count: 5)
growingArc - add custom color for growing Arc, the default value is Color.black
.growingArc(.red, lineWidth: 4)
growingCircle - no parametersgradient - circle with angular gradient border stroke, pass colors like this:
.gradient([.white, .red], lineWidth: 4)
Examples
To try ActivityIndicatorView examples:
- Clone the repo
https://github.com/exyte/ActivityIndicatorView.git - Open
ActivityIndicatorViewExample.xcodeproj - Try it!
Installation
Swift Package Manager
dependencies: [
.package(url: "https://github.com/exyte/ActivityIndicatorView.git")
]
Requirements
- iOS 13+ / watchOS 6+ / tvOS 13+ / macOS 10.15+
- Xcode 11+
Our other open source SwiftUI libraries
LazyCustomLayout - A custom layout protocol for SwiftUI, powered by a lazy scroll view
PopupView - Toasts and popups library
AnchoredPopup - Anchored Popup grows "out" of a trigger view (similar to Hero animation)
Grid - The most powerful Grid container
ScalingHeaderScrollView - A scroll view with a sticky header which shrinks as you scroll
AnimatedTabBar - A tabbar with a number of preset animations
MediaPicker - Customizable media picker
Chat - Chat UI framework with fully customizable message cells, input view, and a built-in media picker
CalendarView - Calendar view with fully customizable month/day cells
OpenAI Wrapper lib for OpenAI REST API
AnimatedGradient - Animated linear gradient
ConcentricOnboarding - Animated onboarding flow
FloatingButton - Floating button menu
ProgressIndicatorView - A number of animated progress indicators
FlagAndCountryCode - Phone codes and flags for every country
SVGView - SVG parser
LiquidSwipe - Liquid navigation animation
探索相关项目
加载中…
