Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
bb66bcd0
Unverified
Commit
bb66bcd0
authored
Dec 21, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: prepared MenuController for release of 2.4.2
parent
33bd6c0f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
26 deletions
+11
-26
Sources/iOS/MenuController.swift
+11
-26
No files found.
Sources/iOS/MenuController.swift
View file @
bb66bcd0
...
@@ -49,8 +49,6 @@ extension UIViewController {
...
@@ -49,8 +49,6 @@ extension UIViewController {
}
}
open
class
MenuController
:
RootController
{
open
class
MenuController
:
RootController
{
open
fileprivate
(
set
)
var
blurView
:
UIView
?
/// Reference to the MenuView.
/// Reference to the MenuView.
@IBInspectable
@IBInspectable
open
let
menu
=
Menu
()
open
let
menu
=
Menu
()
...
@@ -90,21 +88,12 @@ extension MenuController {
...
@@ -90,21 +88,12 @@ extension MenuController {
open
func
openMenu
(
completion
:
((
UIView
)
->
Void
)?
=
nil
)
{
open
func
openMenu
(
completion
:
((
UIView
)
->
Void
)?
=
nil
)
{
if
true
==
isUserInteractionEnabled
{
if
true
==
isUserInteractionEnabled
{
isUserInteractionEnabled
=
false
isUserInteractionEnabled
=
false
UIView
.
animate
(
withDuration
:
0.15
,
animations
:
{
[
weak
self
]
in
if
nil
==
blurView
{
guard
let
s
=
self
else
{
let
blur
=
UIVisualEffectView
(
effect
:
UIBlurEffect
(
style
:
.
light
))
return
blurView
=
UIView
()
blurView
?
.
layout
(
blur
)
.
edges
()
view
.
layout
(
blurView
!
)
.
edges
()
view
.
bringSubview
(
toFront
:
menu
)
}
}
s
.
rootViewController
.
view
.
alpha
=
0.15
// UIView.animate(withDuration: 0.15, animations: { [weak self] in
})
// guard let s = self else {
// return
// }
// s.rootViewController.view.alpha = 0.15
// })
menu
.
open
{
[
completion
=
completion
]
(
view
)
in
menu
.
open
{
[
completion
=
completion
]
(
view
)
in
completion
?(
view
)
completion
?(
view
)
}
}
...
@@ -118,16 +107,12 @@ extension MenuController {
...
@@ -118,16 +107,12 @@ extension MenuController {
*/
*/
open
func
closeMenu
(
completion
:
((
UIView
)
->
Void
)?
=
nil
)
{
open
func
closeMenu
(
completion
:
((
UIView
)
->
Void
)?
=
nil
)
{
if
false
==
isUserInteractionEnabled
{
if
false
==
isUserInteractionEnabled
{
blurView
?
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
0.15
,
animations
:
{
[
weak
self
]
in
blurView
=
nil
guard
let
s
=
self
else
{
return
}
// UIView.animate(withDuration: 0.15, animations: { [weak self] in
s
.
rootViewController
.
view
.
alpha
=
1
// guard let s = self else {
})
// return
// }
// s.rootViewController.view.alpha = 1
// })
menu
.
close
{
[
weak
self
]
(
view
)
in
menu
.
close
{
[
weak
self
]
(
view
)
in
guard
let
s
=
self
else
{
guard
let
s
=
self
else
{
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment