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
Show 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 {
selectionStyle
=
.
None
separatorInset
=
UIEdgeInsetsZero
contentScaleFactor
=
Device
.
scale
imageView
?
.
u
serInteractionEnabled
=
false
textLabel
?
.
u
serInteractionEnabled
=
false
detailTextLabel
?
.
u
serInteractionEnabled
=
false
imageView
?
.
isU
serInteractionEnabled
=
false
textLabel
?
.
isU
serInteractionEnabled
=
false
detailTextLabel
?
.
isU
serInteractionEnabled
=
false
prepareVisualLayer
()
}
...
...
Sources/iOS/MenuController.swift
View file @
f778d3dc
...
...
@@ -59,8 +59,8 @@ public class MenuController : RootController {
all menu items have been opened.
*/
public
func
openMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
u
serInteractionEnabled
{
u
serInteractionEnabled
=
false
if
true
==
isU
serInteractionEnabled
{
isU
serInteractionEnabled
=
false
rootViewController
.
view
.
alpha
=
0.5
menuView
.
open
(
completion
)
}
...
...
@@ -72,10 +72,10 @@ public class MenuController : RootController {
all menu items have been closed.
*/
public
func
closeMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
false
==
u
serInteractionEnabled
{
if
false
==
isU
serInteractionEnabled
{
rootViewController
.
view
.
alpha
=
1
menuView
.
close
({
[
weak
self
]
in
self
?
.
u
serInteractionEnabled
=
true
self
?
.
isU
serInteractionEnabled
=
true
completion
?()
})
}
...
...
Sources/iOS/MenuView.swift
View file @
f778d3dc
...
...
@@ -61,11 +61,11 @@ public class MenuView : PulseView {
all menu items have been opened.
*/
public
func
open
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
false
if
true
==
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
false
menu
.
open
{
[
weak
self
]
(
v
:
UIView
)
in
if
self
?
.
menu
.
views
?
.
last
==
v
{
self
?
.
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
true
self
?
.
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
true
completion
?()
}
}
...
...
@@ -78,11 +78,11 @@ public class MenuView : PulseView {
all menu items have been closed.
*/
public
func
close
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
false
if
true
==
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
{
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
false
menu
.
close
{
[
weak
self
]
(
v
:
UIView
)
in
if
self
?
.
menu
.
views
?
.
last
==
v
{
self
?
.
menu
.
views
?
.
first
?
.
u
serInteractionEnabled
=
true
self
?
.
menu
.
views
?
.
first
?
.
isU
serInteractionEnabled
=
true
completion
?()
}
}
...
...
Sources/iOS/NavigationDrawerController.swift
View file @
f778d3dc
...
...
@@ -608,7 +608,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
if
let
v
:
View
=
leftView
{
hideStatusBar
()
showView
(
v
)
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Left
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
...
...
@@ -634,7 +634,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
if
let
v
:
View
=
rightView
{
hideStatusBar
()
showView
(
v
)
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
delegate
?
.
navigationDrawerWillOpen
?(
self
,
position
:
.
Right
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
...
...
@@ -660,7 +660,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
public
func
closeLeftView
(
velocity
:
CGFloat
=
0
)
{
if
enabledLeftView
{
if
let
v
:
View
=
leftView
{
u
serInteractionEnabled
=
true
isU
serInteractionEnabled
=
true
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Left
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
...
...
@@ -688,7 +688,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
public
func
closeRightView
(
velocity
:
CGFloat
=
0
)
{
if
enabledRightView
{
if
let
v
:
View
=
rightView
{
u
serInteractionEnabled
=
true
isU
serInteractionEnabled
=
true
delegate
?
.
navigationDrawerWillClose
?(
self
,
position
:
.
Right
)
UIView
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
[
weak
self
]
in
...
...
Sources/iOS/RootController.swift
View file @
f778d3dc
...
...
@@ -46,12 +46,12 @@ public class RootController : UIViewController {
A Boolean property used to enable and disable interactivity
with the rootViewController.
*/
@IBInspectable
public
var
u
serInteractionEnabled
:
Bool
{
@IBInspectable
public
var
isU
serInteractionEnabled
:
Bool
{
get
{
return
rootViewController
.
view
.
u
serInteractionEnabled
return
rootViewController
.
view
.
isU
serInteractionEnabled
}
set
(
value
)
{
rootViewController
.
view
.
u
serInteractionEnabled
=
value
rootViewController
.
view
.
isU
serInteractionEnabled
=
value
}
}
...
...
@@ -77,7 +77,7 @@ public class RootController : UIViewController {
- Parameter nibNameOrNil: An Optional String for the nib.
- 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
)
prepareView
()
}
...
...
Sources/iOS/ToolbarController.swift
View file @
f778d3dc
...
...
@@ -98,8 +98,8 @@ public class ToolbarController : RootController {
v
.
view
.
removeFromSuperview
()
v
.
removeFromParentViewController
()
v
.
view
.
layer
.
shouldRasterize
=
false
s
.
u
serInteractionEnabled
=
true
s
.
toolbar
.
u
serInteractionEnabled
=
true
s
.
isU
serInteractionEnabled
=
true
s
.
toolbar
.
isU
serInteractionEnabled
=
true
dispatch_async
(
dispatch_get_main_queue
())
{
[
weak
self
]
in
if
let
s
:
ToolbarController
=
self
{
s
.
delegate
?
.
toolbarControllerDidCloseFloatingViewController
?(
s
)
...
...
@@ -126,8 +126,8 @@ public class ToolbarController : RootController {
view
.
layer
.
rasterizationScale
=
Device
.
scale
view
.
layer
.
shouldRasterize
=
true
internalFloatingViewController
=
v
u
serInteractionEnabled
=
false
toolbar
.
u
serInteractionEnabled
=
false
isU
serInteractionEnabled
=
false
toolbar
.
isU
serInteractionEnabled
=
false
delegate
?
.
toolbarControllerWillOpenFloatingViewController
?(
self
)
UIView
.
animateWithDuration
(
0.5
,
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