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
f778d3dc
Commit
f778d3dc
authored
Jul 14, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated userInteractionEnabled to isUserInteractionEnabled
parent
d2cb2d46
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
25 deletions
+25
-25
Sources/iOS/MaterialTableViewCell.swift
+3
-3
Sources/iOS/MenuController.swift
+4
-4
Sources/iOS/MenuView.swift
+6
-6
Sources/iOS/NavigationDrawerController.swift
+4
-4
Sources/iOS/RootController.swift
+4
-4
Sources/iOS/ToolbarController.swift
+4
-4
No files found.
Sources/iOS/MaterialTableViewCell.swift
View file @
f778d3dc
...
@@ -419,9 +419,9 @@ public class MaterialTableViewCell : UITableViewCell {
...
@@ -419,9 +419,9 @@ public class MaterialTableViewCell : UITableViewCell {
selectionStyle
=
.
None
selectionStyle
=
.
None
separatorInset
=
UIEdgeInsetsZero
separatorInset
=
UIEdgeInsetsZero
contentScaleFactor
=
Device
.
scale
contentScaleFactor
=
Device
.
scale
imageView
?
.
u
serInteractionEnabled
=
false
imageView
?
.
isU
serInteractionEnabled
=
false
textLabel
?
.
u
serInteractionEnabled
=
false
textLabel
?
.
isU
serInteractionEnabled
=
false
detailTextLabel
?
.
u
serInteractionEnabled
=
false
detailTextLabel
?
.
isU
serInteractionEnabled
=
false
prepareVisualLayer
()
prepareVisualLayer
()
}
}
...
...
Sources/iOS/MenuController.swift
View file @
f778d3dc
...
@@ -59,8 +59,8 @@ public class MenuController : RootController {
...
@@ -59,8 +59,8 @@ public class MenuController : RootController {
all menu items have been opened.
all menu items have been opened.
*/
*/
public
func
openMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
openMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
u
serInteractionEnabled
{
if
true
==
isU
serInteractionEnabled
{
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
rootViewController
.
view
.
alpha
=
0.5
rootViewController
.
view
.
alpha
=
0.5
menuView
.
open
(
completion
)
menuView
.
open
(
completion
)
}
}
...
@@ -72,10 +72,10 @@ public class MenuController : RootController {
...
@@ -72,10 +72,10 @@ public class MenuController : RootController {
all menu items have been closed.
all menu items have been closed.
*/
*/
public
func
closeMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
closeMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
false
==
u
serInteractionEnabled
{
if
false
==
isU
serInteractionEnabled
{
rootViewController
.
view
.
alpha
=
1
rootViewController
.
view
.
alpha
=
1
menuView
.
close
({
[
weak
self
]
in
menuView
.
close
({
[
weak
self
]
in
self
?
.
u
serInteractionEnabled
=
true
self
?
.
isU
serInteractionEnabled
=
true
completion
?()
completion
?()
})
})
}
}
...
...
Sources/iOS/MenuView.swift
View file @
f778d3dc
...
@@ -61,11 +61,11 @@ public class MenuView : PulseView {
...
@@ -61,11 +61,11 @@ public class MenuView : PulseView {
all menu items have been opened.
all menu items have been opened.
*/
*/
public
func
open
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
open
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
{
if
true
==
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
false
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
false
menu
.
open
{
[
weak
self
]
(
v
:
UIView
)
in
menu
.
open
{
[
weak
self
]
(
v
:
UIView
)
in
if
self
?
.
menu
.
views
?
.
last
==
v
{
if
self
?
.
menu
.
views
?
.
last
==
v
{
self
?
.
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
true
self
?
.
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
true
completion
?()
completion
?()
}
}
}
}
...
@@ -78,11 +78,11 @@ public class MenuView : PulseView {
...
@@ -78,11 +78,11 @@ public class MenuView : PulseView {
all menu items have been closed.
all menu items have been closed.
*/
*/
public
func
close
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
close
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
{
if
true
==
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
false
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
false
menu
.
close
{
[
weak
self
]
(
v
:
UIView
)
in
menu
.
close
{
[
weak
self
]
(
v
:
UIView
)
in
if
self
?
.
menu
.
views
?
.
last
==
v
{
if
self
?
.
menu
.
views
?
.
last
==
v
{
self
?
.
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
true
self
?
.
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
true
completion
?()
completion
?()
}
}
}
}
...
...
Sources/iOS/NavigationDrawerController.swift
View file @
f778d3dc
...
@@ -608,7 +608,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -608,7 +608,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
if
let
v
:
View
=
leftView
{
if
let
v
:
View
=
leftView
{
hideStatusBar
()
hideStatusBar
()
showView
(
v
)
showView
(
v
)
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Left
)
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Left
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
animations
:
{
...
@@ -634,7 +634,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -634,7 +634,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
if
let
v
:
View
=
rightView
{
if
let
v
:
View
=
rightView
{
hideStatusBar
()
hideStatusBar
()
showView
(
v
)
showView
(
v
)
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Right
)
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Right
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
...
@@ -660,7 +660,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -660,7 +660,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
public
func
closeLeftView
(
velocity
:
CGFloat
=
0
)
{
public
func
closeLeftView
(
velocity
:
CGFloat
=
0
)
{
if
enabledLeftView
{
if
enabledLeftView
{
if
let
v
:
View
=
leftView
{
if
let
v
:
View
=
leftView
{
u
serInteractionEnabled
=
true
isU
serInteractionEnabled
=
true
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Left
)
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Left
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
...
@@ -688,7 +688,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -688,7 +688,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
public
func
closeRightView
(
velocity
:
CGFloat
=
0
)
{
public
func
closeRightView
(
velocity
:
CGFloat
=
0
)
{
if
enabledRightView
{
if
enabledRightView
{
if
let
v
:
View
=
rightView
{
if
let
v
:
View
=
rightView
{
u
serInteractionEnabled
=
true
isU
serInteractionEnabled
=
true
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Right
)
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Right
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
...
...
Sources/iOS/RootController.swift
View file @
f778d3dc
...
@@ -46,12 +46,12 @@ public class RootController : UIViewController {
...
@@ -46,12 +46,12 @@ public class RootController : UIViewController {
A Boolean property used to enable and disable interactivity
A Boolean property used to enable and disable interactivity
with the rootViewController.
with the rootViewController.
*/
*/
@IBInspectable
public
var
u
serInteractionEnabled
:
Bool
{
@IBInspectable
public
var
isU
serInteractionEnabled
:
Bool
{
get
{
get
{
return
rootViewController
.
view
.
u
serInteractionEnabled
return
rootViewController
.
view
.
isU
serInteractionEnabled
}
}
set
(
value
)
{
set
(
value
)
{
rootViewController
.
view
.
u
serInteractionEnabled
=
value
rootViewController
.
view
.
isU
serInteractionEnabled
=
value
}
}
}
}
...
@@ -77,7 +77,7 @@ public class RootController : UIViewController {
...
@@ -77,7 +77,7 @@ public class RootController : UIViewController {
- Parameter nibNameOrNil: An Optional String for the nib.
- Parameter nibNameOrNil: An Optional String for the nib.
- Parameter bundle: An Optional NSBundle where the nib is located.
- Parameter bundle: An Optional NSBundle where the nib is located.
*/
*/
public
override
init
(
nibName
nibNameOrNil
:
String
?,
bundle
nibBundleOrNil
:
NS
Bundle
?)
{
public
override
init
(
nibName
nibNameOrNil
:
String
?,
bundle
nibBundleOrNil
:
Bundle
?)
{
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
prepareView
()
prepareView
()
}
}
...
...
Sources/iOS/ToolbarController.swift
View file @
f778d3dc
...
@@ -98,8 +98,8 @@ public class ToolbarController : RootController {
...
@@ -98,8 +98,8 @@ public class ToolbarController : RootController {
v
.
view
.
removeFromSuperview
()
v
.
view
.
removeFromSuperview
()
v
.
removeFromParentViewController
()
v
.
removeFromParentViewController
()
v
.
view
.
layer
.
shouldRasterize
=
false
v
.
view
.
layer
.
shouldRasterize
=
false
s
.
u
serInteractionEnabled
=
true
s
.
isU
serInteractionEnabled
=
true
s
.
toolbar
.
u
serInteractionEnabled
=
true
s
.
toolbar
.
isU
serInteractionEnabled
=
true
dispatch_async
(
dispatch_get_main_queue
())
{
[
weak
self
]
in
dispatch_async
(
dispatch_get_main_queue
())
{
[
weak
self
]
in
if
let
s
:
ToolbarController
=
self
{
if
let
s
:
ToolbarController
=
self
{
s
.
delegate
?
.
toolbarControllerDidCloseFloatingViewController
?(
s
)
s
.
delegate
?
.
toolbarControllerDidCloseFloatingViewController
?(
s
)
...
@@ -126,8 +126,8 @@ public class ToolbarController : RootController {
...
@@ -126,8 +126,8 @@ public class ToolbarController : RootController {
view
.
layer
.
rasterizationScale
=
Device
.
scale
view
.
layer
.
rasterizationScale
=
Device
.
scale
view
.
layer
.
shouldRasterize
=
true
view
.
layer
.
shouldRasterize
=
true
internalFloatingViewController
=
v
internalFloatingViewController
=
v
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
toolbar
.
u
serInteractionEnabled
=
false
toolbar
.
isU
serInteractionEnabled
=
false
delegate
?
.
toolbarControllerWillOpenFloatingViewController
?(
self
)
delegate
?
.
toolbarControllerWillOpenFloatingViewController
?(
self
)
UIView
.
animateWithDuration
(
0.5
,
UIView
.
animateWithDuration
(
0.5
,
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
...
...
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