Lightweight and easy to use blurred popup view written in Swift. You will find it very similar to your iOS folders at Springboard (Home screen).
Swift
Switch branches/tags
Nothing to show
Clone or download
Vladislav Kovalyov
Latest commit 1116097 Feb 3, 2017
Permalink
Failed to load latest commit information.
Assets Initial commit Feb 2, 2017
VKPopupView Scope improvements Feb 3, 2017
VKPopupViewExample Added VKPopupViewDelegate example usage Feb 3, 2017
.gitignore.txt Initial commit Feb 2, 2017
LICENSE Updated year Feb 3, 2017
README.md Quick fix Feb 2, 2017

README.md

VKPopupView banner

Description

VKPopupView is lightweight and easy to use blurred popup view written in Swift. You will find it very similar to your iOS folders at Springboard (Home screen).

Installation

You can install VKPopupView manually only. Just add content of the VKPopupView folder into your project.

Example project and Live Demo

Example project shows how to you use VKPopupView in a different ways. To test it it, clone the repo and run it from the VKPopupViewExample directory.

Live demo is available at appetize.io

Usage

When I'm saying it is easy to use - it is always true. Please take a look on it:

//// Step 1: Prepare all the staff
// 1.a Init popup
let popup = VKPopupView()

// 1.b Prepare your content
let contentView = UIView(...)

// 1.c Specify initial frame. `VKPopupView` will start appearance from this frame
let rect = CGRect(...)

//// Step 2: Just show it
popup.show(contentView: contentView, withTitle: "My cool title", fromRect: rect)
//// Profit!

You can easily set blur styles for your VKPopupView. Just these two properties in order to get what you need:

var backgroundBlurStyle: UIBlurEffectStyle  = .light
var contentViewBlurStyle: UIBlurEffectStyle = .extraLight

VKPopupViewDelegate

You can handle all stages of VKPopupView appearance with VKPopupViewDelegate. It provides next functions:

@objc optional func popupViewWillShow(_ popupView: VKPopupView)
@objc optional func popupViewDidShow(_ popupView: VKPopupView)
@objc optional func popupViewWillHide(_ popupView: VKPopupView)
@objc optional func popupViewDidHide(_ popupView: VKPopupView)

TODO

  • Customization of the title label
  • Add full-size support for iPad

Author

Vladislav Kovalyov, http://woopss.com/

License

VKPopupView is available under the MIT License. See the LICENSE file for more info.