Git Product home page Git Product logo

cfifrostedoverlayview's Introduction

CFIFrostedOverlayView

A view that renders its superview with a gaussian blur like iOS 7's Control Center

Frosted Overlay Screenshot

Caveats

Because of the way that this control renders its superview, you must provide it an offset if you choose to not have the control take up the entirety of its superview, and guarantee that it is not onscreen when its superview is being rendered. For example, the demo project shows how to offset the control by 20 pixels from the top of the screen.

  self.controlCenter = //...
	self.controlCenter.offset = 20.f;
	[self.view addSubview:self.controlCenter];
	self.controlCenter.viewToBlur = self.view;

The inset of the control's frame and its contentOffset must match exactly, else the rendered view will be mis-aligned with the actual view.

cfifrostedoverlayview's People

Contributors

codafi 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfifrostedoverlayview's Issues

demo project doesn't compile

git clone https://github.com/CodaFi/CFIFrostedOverlayView --recursive

Then build:

~/Desktop/CFIFrostedOverlayView/CFIFrostedOverlayView/CFIFrostedOverlayView.m:12:9: fatal error: 'GPUImage.h' file not found

"Live" Gaussian Blurs

There's a reason Control Center acts like Notification Center (i.e. freezing the screen), but I still want a "live" updating view without all the image nonsense.

Getting white view in simulator, but demo project works

Hello, great control, can't wait til I can get it figured out. I built the demo project for the simulator and it works fine. I went ahead and added the project files to a custom project, and when I try to add the blur on my view I just get a white rectangle.

I'm wondering if it's because I'm not giving it enough time to render before displaying it. Your sample code in the ReadMe has the view being added to the superview before the viewToBlur property gets set. However, you also say this:

"Because of the way that this control renders its superview, you must provide it an offset if you choose to not have the control take up the entirety of its superview, and guarantee that it is not onscreen when its superview is being rendered."

Should I instead be changing the viewToBlur property before I add to the superview? I also wonder if I should be rendering the frosted view as early as possible, because right now I do it instantly on a button touch. (I have a scroll view with a changing background that would affect the actual image that gets overlaid...no way to know the content offset inside the scrollview until the user touches the button)

LICENSE

Hi,

There is no license for the project. Could I suggest MIT?

OS X Port

Control should be nearly identical, though NSView might not want any part in this

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.