A view class for iOS that makes uploading easy and beautiful.

Overview

Upload

SVUploader Platform

License MIT Build Passing

A view class for iOS that makes uploading easy and beautiful.

Demo

SVUploader is fully customizable - check out 2 demos.

Demo 1 Demo 2

Installation

Just drag the SVUploader.swift file to your project, and you'll be all set to go.

Guide

SVUploader takes care of the visual part of the upload part of process for you; all you have to do is instantiate an SVUploader, place it on the screen, and give it the progress of your upload. It's that simple! Let's go ahead and start with an example.

Use it! (Quick and Simple)

Now, if you just want to use it straight out of the box, it's extremely simple.

// Create the uploader view
let uploaderView = SVUploader(frame: uploaderFrame)

// Set the image you want to upload
uploaderView.image = imageThatIWantToUpload

// Start the upload
uploaderView.startUpload()

// Update the progress in your update code
uploaderView.progress = newProgress

// End the upload, and specify whether it succeeded or failed
self.uploaderView.endUpload(success: true)

SVUploader will automatically present the appropriate view depending on whether or not there was an error.

The following are about the more detailed parts of SVUploader that you can customize to create a unique experience.

Properties

SVUploader has several properties that you can change. The default values are specified, and they're set to one variation of what I think looks nice. Some of these variables can only be set using the initializers and cannot be changed later, so check out that section next.

isUploading (read-only) - Whether or not the UI is currently uploading. This is internally managed and should only be read by the user.

progressAnimationSpeed (2) - The speed of the circular animation between progress value changes. This number should be changed depending on the length of intervals between each progress percentage update (the time it takes to receive an update on how much of the upload has been finished). For larger intervals, a lower speed is recommended for a smoother animation. For shorter intervals, a higher speed is recommended to prevent slow animation and lag. This default value of 2 should work fine for most default intervals.

useSmoothAnimation (true) (initializer-only) - iOS automatically animates the path changes to make things look smooth. You can disable this effect, although it would probably just make it looks worse (but hey, I don't judge).

useBlur (false) (initializer-only) - Whether the overlay uses a blur effect or a dark overlay effect. Can only be set using the initializer.

useShadow (false) (initializer-only) - Whether the uploader uses the shadow effect. Can only be set using the initializer.

lineColor (dark purple) - The color of the circular loader.

lineWidth (12) - The line width of the circular loader.

borderColor (dark gray) - The border color.

borderWidth (0) - The border width.

overlayOpacity (0.6) - The opacity of the dark overlay effect (only applicable if useBlur is false).

mainFont (Avenir-Medium Size 30) - The font of the percentage text in the uploader.

messageDuration (2 seconds) - The duration of the message to be displayed at the end of the upload.

successImage (Green check) - The image to present when an upload is successful.

errorImage (Red X) - The image to present when an upload has failed.

progress - The progress percentage of the upload. Update this variable with a decimal to update the uploader.

Initializers

There are several different initializers for different needs. Not all properties can be set using an initializer, so be sure to check them above and change any if needed after initializing a view. Use the last one if you want to change variables that can only be set with the initializer.

init(frame: CGRect) - The standard initalizer. It sets everything up but you can still change some properties later.

init(lineColor: UIColor, lineWidth: CGFloat) - The most commonly used one. You can customize the most important part of the loader - the circular loader.

init(lineColor: UIColor, lineWidth: CGFloat, borderColor: UIColor, borderWidth: CGFloat - A little fancier. You can now add in a border as well.

init(useBlur: Bool, useShadow: Bool, useSmoothAnimation: Bool) - The initializer only variables can be set here. To keep it short, I've only included those, but you can still change the rest of the properties later.

Use it! (Advanced Customization)

Now, let's take a look at how to customize this experience. SVUploader is extremely modular; take a look at its view structure. The following views can be swapped out with your own for a custom look - just set the property equal to your own custom view.

Here's a hierarchy view of SVUploader.

Upload

contentView - The "content" or image of the uploader view. If you want more than just a thumbnail picture to show up, you can customize it by replacing it with your own view.

overlayView - The view that overlays the contentView. By default, it is a dark overlay or blur.

loadingLabel - The text that describes the progress of the upload. By default, it displays the percentage, but you can edit its text or create your own new label.

endView - The view that shows up after the upload has finished. By default, it shows an error/success image.

If you don't want to create a brand new view from scratch, and just want to modify some of the details such as the blur effect or image size, you can take a look at all of the views the class uses by reading the source code.

Coming Soon

SVUploader still has a lot more potential with more customizability and cooler features, such as:

  • Specify a text message (not just image) after the upload
  • Pick from several different animation options
  • Anything else you can think of. Feel free to open an issue for a feature request, or contribute to the project!

Contribute

Feel free to to contribute to the project with any features you think would be cool or bug fixes. You can also help by simply opening up an issue if you find a bug or would like a new feature to be added. I'll try my best to continue and update the project.

You might also like...
StatusBarOverlay will automatically show a
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again

StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

A clean and lightweight progress HUD based on SVProgressHUD, converted to Swift with the help of Swiftify.

IHProgressHUD IHProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. IHProgressHUD is based on

The easiest way to handle a simple full screen activity indicator in iOS. Written in Swift.
The easiest way to handle a simple full screen activity indicator in iOS. Written in Swift.

LLSpinner An easy way to handle full screen activity indicator. Easy to use Get Started // Show spinner LLSpinner.spin() // Hide spinner LLSpinner.st

Flexible Stepped Progress Bar for IOS
Flexible Stepped Progress Bar for IOS

FlexibleSteppedProgressBar This is a stepped progress bar for IOS. The base code is derived from ABSteppedProgressBar. Most of the design is customisa

Material Linear Progress Bar for your iOS apps
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

IOS HUD Swift Library

JHProgressHUD JHProgressHUD is an iOS class written in Swift to display a translucent HUD with an indicator and/or labels while work is being done in

A tiny library makes uploading and downloading easier

Features uploading/downloading multiple files concurrently or sequentially grouping tasks with awesome custom operators (||| and --) supports backgro

Xcode Plugin helps you find missing methods in your class header, protocols, and super class, also makes fast inserting.

FastStub-Xcode Life is short, why waste it on meaningless typing? What is it? A code generating feature borrowed from Android Studio. FastStub automat

Phimp.me - Photo Image Editor and Sharing App. Phimp.me is a Photo App for iOS that aims to replace proprietary photo applications. It offers features such as taking photos, adding filters, editing images and uploading them to social networks. 🚀  It Makes easy to track your task 🔥 Beautiful & Animated UI👨🏻‍💻  . Contributions are always welcome 🤗
🚀 It Makes easy to track your task 🔥 Beautiful & Animated UI👨🏻‍💻 . Contributions are always welcome 🤗

Taskey 🚀 What is Taskey 🤔 ? Taskey is an application build in SwiftUI to track your task with a beautiful animations and UI . Also used core data to

🚀  It Makes easy to track your task 🔥 Beautiful & Animated UI👨🏻‍💻  . Contributions are always welcome 🤗
🚀 It Makes easy to track your task 🔥 Beautiful & Animated UI👨🏻‍💻 . Contributions are always welcome 🤗

Taskey 🚀 What is Taskey 🤔 ? Taskey is an application build in SwiftUI to track your task with a beautiful animations and UI . Also used core data to

A fast, convenient and nonintrusive conversion framework between JSON and model. Your model class doesn't need to extend any base class. You don't need to modify any model file.

MJExtension A fast, convenient and nonintrusive conversion framework between JSON and model. 转换速度快、使用简单方便的字典转模型框架 📜 ✍🏻Release Notes: more details Co

A simple class that wraps the process of saving or loading a struct or class into a single file

EZFile This is a simple class that wraps the process of saving or loading a stru

ANDLineChartView is easy to use view-based class for displaying animated line chart.
ANDLineChartView is easy to use view-based class for displaying animated line chart.

ANDLineChartView for iOS ANDLineChartView is easy to use view-based class for displaying animated line chart. Usage API is simple. Just implement foll

A child view controller framework that makes setting up your parent controllers as easy as pie.
A child view controller framework that makes setting up your parent controllers as easy as pie.

Description Family is a child view controller framework that makes setting up your parent controllers as easy as pie. With a simple yet powerful publi

Windless makes it easy to implement invisible layout loading view.
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

Windless makes it easy to implement invisible layout loading view.
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

A beautiful and easy-to-use progress HUD for your iOS.
A beautiful and easy-to-use progress HUD for your iOS.

日本語 KRProgressHUD is a beautiful and easy-to-use progress HUD for your iOS written by Swift. KRActivityIndicatorView is used for loading view. Feature

Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.

🚨 Warning This repository is DEPRECATED and not maintained anymore. Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS

Owner
Kiran
A guy who makes cool stuff.
Kiran
A beautiful activity indicator and modal alert written in Swift (originally developed for my app DoodleDoodle) Using blur effects, translucency, flat and bold design - all iOS 8 latest and greatest

SwiftSpinner SwiftSpinner is an extra beautiful activity indicator with plain and bold style. It uses dynamic blur and translucency to overlay the cur

Marin Todorov 2.1k Dec 19, 2022
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

Yonat Sharon 340 Dec 16, 2022
💀 An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.

Skeleton is an easy way to create sliding CAGradientLayer animations! It works great for creating skeleton screens: ??‍?? Usage The entire library com

Gonzalo Nuñez 668 Nov 2, 2022
This is a beauful hud view for iPhone & iPad

WSProgressHUD This is a beauful hud view for iPhone & iPad Usage To Download the project. Run the WSProgressHUD.xcodeproj in the demo directory. [

Wilson 583 Dec 6, 2022
Show pleasant loading view for your users 😍

RHPlaceholder ?? Because traditional loading view like UIActivityIndicatorView or similar one are no longer so trendy (Facebook or Instagram apps are

Robert Herdzik 238 Nov 2, 2022
A lightweight and awesome loading Activity Indicator for your iOS app.

BPCircleActivityIndicator BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on

Ben.Park 46 Aug 12, 2022
A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

BPBlockActivityIndicator BPBlockActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iO

Ben.Park 43 Nov 6, 2021
UIProgressView replacement with an highly and fully customizable animated progress bar in pure Core Graphics

The YLProgressBar is an UIProgressView replacement with a highly and fully customizable animated progress bar in pure Core Graphics. It has been imple

Yannick Loriot 1.3k Jan 5, 2023
Simple and powerful animated progress bar with dots

Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 8.0+ Swift 3.0+ Installatio

Nikola Corlija 42 Dec 5, 2022
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features • Guides • Installation • Usage • Miscellaneous • Contributing ?? README is available in other languages: ???? . ???? . ???? . ???? . ???? To

Juanpe Catalán 11.7k Jan 8, 2023