MUDownloadButton - a Progressive Download button written in pure swift and inspired by AppStore download button

Overview

SPM compatible License

MUDownloadButton is a Progressive Download button written in pure swift and inspired by AppStore download button . feel free to contribute and pull requests

Requirements

  • iOS 13.0+
  • Swift 5.0+

Usage

Code

To use MUDownloadButton create an instance and add it to your own view as a subview:

  let downloadButton = MUDownloadButton()
  downloadButton.frame = CGRect(origin: origin, size: size)
  view.addSubview(downloadButton)

The button can have 4 different states:

  • idle - before downloading state
  • waiting - between start request and actual start
  • downloading - when download is started
  • downloaded - when download finished

The state of the button can be changed through its state property.

Delegate

You can use the MUDownloadButtonDelegate to monitor taps on button and state changes . The progress of download can be changed through itss progress property.

Customisation

  1. Customizable properties are :
  • mainTintColor - main color of button
  • downloadedButtonImage - downloaded button image - system images preferred
  • idleButtonImage - idle button image - system images preferred

Demo

To run the example project, clone the repo, and run the Demo directory

Installation

Currently only supports SPM and iOS 13+

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding AHDownloadButton as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: https://github.com/mahadshahib/MUDownloadButton.git, .upToNextMajor(from: "0.9.9"))
]

Author

Mohammad ShahibZadeh

License

MUDownloadButton is licensed under the MIT license. Check the LICENSE file for details.

You might also like...
Bubble pickers, inspired by Apple
Bubble pickers, inspired by Apple

AmazingBubbles Bubble pickers, inspired by Apple Requirements: iOS 9.1+ XCode 8.0+ Swift 3.0 Installation AmazingBubbles Library is available through

A radio button with a pretty animation
A radio button with a pretty animation

LTHRadioButton Slightly inspired by Google's material radio button. The clip below has 3 sections: full speed, 25% and 10%, but after converting it to

Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button
Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button

Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and can other actions can be triggers using its delegate method.

🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0
🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0

Introduction 🏞 MediaBrowser can display one or more images or videos by providing either UIImage objects, PHAsset objects, or URLs to library assets,

TSnackBarView is a simple and flexible UI component fully written in Swift
TSnackBarView is a simple and flexible UI component fully written in Swift

TSnackBarView is a simple and flexible UI component fully written in Swift. TSnackBarView helps you to show snackbar easily with 3 styles: normal, successful and error

TDetailBoxView is a simple and flexible UI component fully written in Swift
TDetailBoxView is a simple and flexible UI component fully written in Swift

TDetailBoxView is a simple and flexible UI component fully written in Swift. TDetailBoxView is developed to help users quickly display the detail screen without having to develop from scratch.

TSwitchLabel is a simple and flexible UI component fully written in Swift.
TSwitchLabel is a simple and flexible UI component fully written in Swift.

TSwitchLabel is a simple and flexible UI component fully written in Swift. TSwitchLabel is developed for you to easily use when you need to design a UI with Label and Switch in the fastest way without having to spend time on develop from scratch.

A message bar for iOS written in Swift.
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Cool Animated music indicator view written in Swift
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. ζœ¬δΊΊθ‘—δ½œηš„δΉ¦η±γ€ŠLa

Releases(1.0.0)
Owner
Mohammad ShahibZadeh
Self tought iOS Developer , Founder of Cheetah development group
Mohammad ShahibZadeh
A Powerful , Extensible CSS Parser written in pure Swift.

A Powerful , Extensible CSS Parser written in pure Swift. Basic Usage From CSS: #View { "width" : 118; "height" : 120.5; "color1" : "#888888"; "co

null 273 Sep 9, 2022
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift

SKPhotoBrowser Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift features Display one or more images by providi

keishi suzuki 2.4k Jan 6, 2023
πŸš€ Elegant Pager View fully written in pure SwiftUI.

PagerTabStripView Made with ❀️ by Xmartlabs team. XLPagerTabStrip for SwiftUI! Introduction PagerTabStripView is the first pager view built in pure Sw

xmartlabs 482 Jan 9, 2023
A modern HUD inspired by Apple Music and Apple Podcasts

HUD A modern HUD inspired by Apple Music and Apple Podcasts. Appearance Light Dark HUD Activity Indicator HUD Requirements iOS 13+ Installation You ca

Bei Li 30 Nov 18, 2022
Swipe Left2Right & Right2Left, pure SwiftUI implementation

SwipeCell Preview Features Swipe cell from Left2Right & Right2Left. Destructive swipe Usage Simply add onSwipe(leading, trailing) method to your list

Enes Karaosman 266 Jan 6, 2023
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲

Magnetic Magnetic is a customizable bubble picker like the Apple Music genre selection. Demo Video $ pod try Magnetic Features Adding/Removing Nodes

Lasha Efremidze 1.4k Jan 6, 2023
Iridescent Effect View (inspired by Apple Pay Cash) ✨

Shiny Shiny is an iOS library that generates an iridescent effect view matched to the gyroscope, similar to the Apple Pay Cash card in the Wallet app.

Lasha Efremidze 768 Dec 2, 2022
A micro UIStackView convenience API inspired by SwiftUI

Stacks A micro UIStackView convenience API inspired by SwiftUI. let stack: UIView = .hStack(alignment: .center, margins: .all(16), [ .vStack(spaci

Alexander Grebenyuk 74 Jul 27, 2022
SwiftUI: Components Library Inspired by Twitter's Bootstrap

bootswiftui SwiftUI: Components Library Inspired by Twitter's Bootstrap Warning This is just SwiftUI exercise. Please do not consider using this repo

Robert Sandru 1 Oct 27, 2022
A spotlight-inspired quick action bar for macOS.

DSFQuickActionBar A spotlight-inspired quick action bar for macOS. Why? I've seen this in other mac applications (particularly spotlight) and it's ver

Darren Ford 31 Dec 14, 2022