GithubHelp home page GithubHelp logo

unboxme / blurberry Goto Github PK

View Code? Open in Web Editor NEW
54.0 6.0 7.0 1.1 MB

Transparent blur using UIVisualEffectView without subclassing

License: MIT License

Objective-C 54.82% Swift 41.96% Ruby 3.22%
uivisualeffectview blur blurview blureffects

blurberry's Introduction

Blurberry

Transparent blur using UIVisualEffectView without subclassing.

GIF Demo

[video demo]

[appetize demo]

Features

  • Based on UIVisualEffectView
  • Supports iOS 14 and animation blocks
  • Super safe and super easy

Usage

Just create a UIVisualEffectView in any way. Code, storyboards, XIBs, etc.

Customize it like example bellow via blur wrapper:

visualEffectView.blur.radius = 5.0
visualEffectView.blur.tintColor = .clear

Don't forget to set a tintColor value, otherwise it will be 30% white like UIBlurEffect.Style.Light by default.

Installation

Cocoapods

Add the Blurberry pod to your Podfile:

platform :ios, '10.0'

use_frameworks!

target 'BlurryApp' do
  pod 'Blurberry' 
end

Next Steps

  • iOS 10, 11, 12 support
  • Other platform support (such as macOS)
  • Remove ObjC code or make it private
  • Add manager to check blur availability and other service info
  • Hide private API class names, method names, etc.

Disclaimer

This framework uses private API, so just keep in mind it before submitting to the AppStore.

Requirements

  • iOS 10.0+
  • Swift 5

blurberry's People

Contributors

unboxme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blurberry's Issues

Why using .light style?

Hi @unboxme

First, very thanks for your work to research about _UICustomBlurEffect and iOS 14 workaround!

while using Blurberry, I found blured view is little whitey even if blur radius is 0.0 and tintColor is set to .clear

That is caused using .light style for base effect in this line https://github.com/unboxme/Blurberry/blob/0.1.0/Sources/Views/VisualEffectView+Internal.swift#L79

I try to change to simple init like this base.effect = UIBlurEffect()
then truely same color when blur radius is 0.

And, this is also for no longer need set tintColor to .clear for removing whitey purpose.

This is screenshot of before and after. (under the black border is UIVisualEffectView)

before (using .light) after (using .init())
スクリーンショット 2020-12-28 17 11 09 スクリーンショット 2020-12-28 17 10 12

Refs:
tested project: https://github.com/r-plus/BlurberryTest

Blur doesn't work on tinted color

Hey,

Firstly, thanks for this library, i was earlier having issues on ios14 and the default blur stopped working for me and i couldn't find a solution to fix it.

Thankfully, with your library it works fine with clear color in the tint: blurEffectView.blur.tintColor = .clear

However, if i change the tint color to any other color i loose the blur and it just gives me a solid background, like screenshot below. Any idea why that could be happening?

IMG_8EEA77BA2622-1

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.