Skip to content

vladislav-k/VKPopupView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages