GithubHelp home page GithubHelp logo

onevcat / vvblurpresentation Goto Github PK

View Code? Open in Web Editor NEW
891.0 891.0 83.0 4 MB

A simple way to present a view controller with keeping the blurred previous one.

License: MIT License

Objective-C 96.65% Ruby 3.35%

vvblurpresentation's Introduction

VVBlurPresentation

A simple way to present a view controller with keeping the blurred previous one.

It uses UIBlurEffectStyle in iOS 8 SDK, so it is only compatibility with iOS 8 and later.

Screenshot

A demo is better than 100 words.

Screenshot

How to Install

CocoaPods

The easiest way to integrate VVBlurPresentation into your project would be using CocoaPods. Add the snippet to your Podfile under the correct target and run pod install.

pod 'VVBlurPresentation'

Manually

Clone the repo and add files under Source folder to your project.

How to Use

Briefly, make your presented view controller as a subclass of VVBlurViewController, then present it as usual.

You can use it with both code and storyboard.

  1. Create or change your presented view controller as a subclass of VVBlurViewController.

    //PresentedViewController.h
    #import "VVBlurViewController.h"
    @interface PresentedViewController : VVBlurViewController
    
    @end
    
    //PresentedViewController.m
    //...
  2. Create an instance of PresentedViewController and present it from your presenting view controller.

    //PresentingViewController.m
    
    #import "PresentedViewController.h"
    
    - (void)present {
        PresentedViewController *pvc = [PresentedViewController new];
        [self presentViewController:pvc animated:YES completion:nil];
    }

If you are using storyboard, change the class of your view controller to the subclass of VVBlurViewController (PresentedViewController here). Then use a "Present Modally" segue to present the new view controller.

Blur Styles

All three blur styles (UIBlurEffectStyleExtraLight, UIBlurEffectStyleLight and UIBlurEffectStyleDark) are supported. You can set the blurStyle property of presented view controller to change the style. The default is dark.

License

VVBlurPresentation is released under MIT license.

vvblurpresentation's People

Contributors

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

vvblurpresentation's Issues

喵神这个 present 的时候设置有点问题

当我想 fadein 一个 vc 而不是默认从下方出来的时候有问题 我设置 modalTransitionStyle = UIModalTransitionStyleCrossDissolve,页面过渡到最后展现出来前,会卡顿一下, demo 工程也有这个问题

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.