Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves bugfixes after migrating to Swift 4.2 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions FilterLayer/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
Expand Down Expand Up @@ -64,6 +84,11 @@
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
6 changes: 3 additions & 3 deletions FilterLayer/BKFilter/BKFilterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class BKFilterView: UIView {

//MARK:- Control functions

internal func setExcludedViews(views: [UIView]?)
func setExcludedViews(views: [UIView]?)
{
presetExcludedViews = views
}

internal func revealCircular(duration: CFTimeInterval = 0.3, completion: (() -> Void)?)
func revealCircular(duration: CFTimeInterval = 0.3, completion: (() -> Void)?)
{
self.isUserInteractionEnabled = false

Expand Down Expand Up @@ -149,7 +149,7 @@ class BKFilterView: UIView {
CATransaction.commit()
}

internal func hideCircular(duration: CFTimeInterval = 0.3, completion: (() -> Void)?)
func hideCircular(duration: CFTimeInterval = 0.3, completion: (() -> Void)?)
{
self.isUserInteractionEnabled = false

Expand Down
12 changes: 6 additions & 6 deletions FilterLayer/FilterDemonstationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class FilterDemonstationViewController: UIViewController, BKFilterViewDelegate {

//MARK:- Control functions

internal func setFiltertype(type: BKFilterType) {
func setFiltertype(type: BKFilterType) {

self.title = type.rawValue
filterType = type
Expand All @@ -67,7 +67,7 @@ class FilterDemonstationViewController: UIViewController, BKFilterViewDelegate {
filterView.autoresizingMask = [UIView.AutoresizingMask.flexibleLeftMargin, .flexibleRightMargin, .flexibleTopMargin ,.flexibleBottomMargin]
self.view.addSubview(filterView)

let gesture = UIPanGestureRecognizer(target: self, action: Selector(("viewDragged:")))
let gesture = UIPanGestureRecognizer(target: self, action: #selector((viewDragged(gesture:))))
gesture.cancelsTouchesInView = false
filterView.addGestureRecognizer(gesture)

Expand All @@ -78,12 +78,12 @@ class FilterDemonstationViewController: UIViewController, BKFilterViewDelegate {

//MARK:- BKFilterViewDelegate

internal func exculdedViews() -> [UIView]?
func exculdedViews() -> [UIView]?
{
return nil
}

internal func manipulateFilterContext( context: inout CGContext, rect: CGRect) {
func manipulateFilterContext( context: inout CGContext, rect: CGRect) {

var filterValues = [String: AnyObject?]()
let centerVector = CIVector(x: rect.size.width*1.5, y: rect.size.height*1.5)
Expand All @@ -109,7 +109,7 @@ class FilterDemonstationViewController: UIViewController, BKFilterViewDelegate {

//MARK:- Private functions

internal func viewDragged(gesture: UIPanGestureRecognizer)
@objc func viewDragged(gesture: UIPanGestureRecognizer)
{
let filterView = gesture.view as! BKFilterView
let translation = gesture.translation(in: filterView) as CGPoint
Expand Down Expand Up @@ -146,7 +146,7 @@ class FilterDemonstationViewController: UIViewController, BKFilterViewDelegate {

//MARK:- Button actions

@objc internal func leftMenuButtonAction(button: UIButton)
@objc func leftMenuButtonAction(button: UIButton)
{
self.navigationController?.dismiss(animated: true, completion: { () -> Void in
})
Expand Down