Giter Club home page Giter Club logo

volumizer's Introduction

Volumizer

Platform Language Cocoapods Compatible Carthage compatible GitHub license PRs Welcome

Volumizer replaces the system volume popup with a simple progress bar.

Before After After (iPhoneX)
good good good

Features

  • Swift 4
  • Hide the system volume HUD typically displayed on volume button presses
  • Show a simple progress bar like Instagram's iOS app does
  • Support iPhoneX
  • Well easy to customize appearance
  • Only support portrait mode

Installation

platform :ios, '8.0'
use_frameworks!

pod 'Volumizer'
github "fxwx23/Volumizer"
Manually

Drag the Volumizer folder into your project and link the MediaPlayer and AVFoundation frameworks to your project.

Usage

Use of Volumizer is a simple way with one line. Just call configure() after set a window at least.

Volumizer.configure()

You can customize the bar's appearance with VolumizerAppearanceOption.

/**
public enum VolumizerAppearanceOption {
   case overlayIsTranslucent(Bool) default is `true`.
   case overlayBackgroundBlurEffectStyle(UIBlurEffectStyle) default is `.extraLight`.
   case overlayBackgroundColor(UIColor) default is `.white`.
   case sliderProgressTintColor(UIColor) default is `.black`.
   case sliderTrackTintColor(UIColor) default is `.lightGray.withAlphaComponent(0.5)`
}
*/

let options: [VolumizerAppearanceOption] = [ .overlayIsTranslucent(true),
                                             .overlayBackgroundBlurEffect( .extraLight),
                                             .overlayBackgroundColor( .white),
                                             .sliderProgressTintColor( .black)]

let volumizer = Volumizer.configure(options)

/// To change options based on view's current appearance, call `update(options:_)` .
volumizer.change(options: otherOptions)

If you want to release volumizer 's window, please call resign(). Once you released, the system volume popup will be shown again.

volumizer.resign()

WIP

  • support landscape mode.
  • support SPM.
  • manage window level to be below UIWindowLevelAlert .
  • Objective-C compatible.

License

This project is under the MIT license.

volumizer's People

Contributors

fxwx23 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.