Skip to content

Commit

Permalink
Merge pull request #2 from tmitz/feature/uiblureffect_variable
Browse files Browse the repository at this point in the history
Add UIBlurEffectStyle variable
  • Loading branch information
cockscomb committed May 7, 2016
2 parents 698fbaa + 7b5cc1a commit fa362d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10102" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10080"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Container-->
Expand Down
7 changes: 5 additions & 2 deletions HUDKit/Classes/Progress/HUDProgressViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ public class HUDProgressViewController: UIViewController {
}
}

public var visualEffect: UIVisualEffect?

// MARK: - Initializer

public init(customView: UIView?, status: String?) {
public init(customView: UIView?, status: String?, visualEffect: UIVisualEffect? = nil) {
super.init(nibName: "HUDProgressViewController", bundle: NSBundle(forClass: HUDProgressViewController.self))

self.customView = customView
self.status = status
self.visualEffect = visualEffect

if let customView = customView {
let insets = UIEdgeInsets(top: -30, left: -30, bottom: -30, right: -30)
Expand Down Expand Up @@ -116,7 +119,7 @@ extension HUDProgressViewController: UIViewControllerTransitioningDelegate {

public func presentationControllerForPresentedViewController(presented: UIViewController, presentingViewController presenting: UIViewController, sourceViewController source: UIViewController) -> UIPresentationController? {
let HUD = HUDPresentationController(presentedViewController: presented, presentingViewController: presenting)
HUD.HUDVisualEffect = UIBlurEffect(style: .Dark)
HUD.HUDVisualEffect = self.visualEffect ?? UIBlurEffect(style: .Dark)
return HUD
}

Expand Down

0 comments on commit fa362d0

Please sign in to comment.