Commit f778d3dc by Daniel Dahan

updated userInteractionEnabled to isUserInteractionEnabled

parent d2cb2d46
......@@ -419,9 +419,9 @@ public class MaterialTableViewCell : UITableViewCell {
selectionStyle = .None
separatorInset = UIEdgeInsetsZero
contentScaleFactor = Device.scale
imageView?.userInteractionEnabled = false
textLabel?.userInteractionEnabled = false
detailTextLabel?.userInteractionEnabled = false
imageView?.isUserInteractionEnabled = false
textLabel?.isUserInteractionEnabled = false
detailTextLabel?.isUserInteractionEnabled = false
prepareVisualLayer()
}
......
......@@ -59,8 +59,8 @@ public class MenuController : RootController {
all menu items have been opened.
*/
public func openMenu(completion: (() -> Void)? = nil) {
if true == userInteractionEnabled {
userInteractionEnabled = false
if true == isUserInteractionEnabled {
isUserInteractionEnabled = 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 == userInteractionEnabled {
if false == isUserInteractionEnabled {
rootViewController.view.alpha = 1
menuView.close({ [weak self] in
self?.userInteractionEnabled = true
self?.isUserInteractionEnabled = true
completion?()
})
}
......
......@@ -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?.userInteractionEnabled {
menu.views?.first?.userInteractionEnabled = false
if true == menu.views?.first?.isUserInteractionEnabled {
menu.views?.first?.isUserInteractionEnabled = false
menu.open { [weak self] (v: UIView) in
if self?.menu.views?.last == v {
self?.menu.views?.first?.userInteractionEnabled = true
self?.menu.views?.first?.isUserInteractionEnabled = 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?.userInteractionEnabled {
menu.views?.first?.userInteractionEnabled = false
if true == menu.views?.first?.isUserInteractionEnabled {
menu.views?.first?.isUserInteractionEnabled = false
menu.close { [weak self] (v: UIView) in
if self?.menu.views?.last == v {
self?.menu.views?.first?.userInteractionEnabled = true
self?.menu.views?.first?.isUserInteractionEnabled = true
completion?()
}
}
......
......@@ -608,7 +608,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
if let v: View = leftView {
hideStatusBar()
showView(v)
userInteractionEnabled = false
isUserInteractionEnabled = 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)
userInteractionEnabled = false
isUserInteractionEnabled = 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 {
userInteractionEnabled = true
isUserInteractionEnabled = 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 {
userInteractionEnabled = true
isUserInteractionEnabled = 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
......
......@@ -46,12 +46,12 @@ public class RootController : UIViewController {
A Boolean property used to enable and disable interactivity
with the rootViewController.
*/
@IBInspectable public var userInteractionEnabled: Bool {
@IBInspectable public var isUserInteractionEnabled: Bool {
get {
return rootViewController.view.userInteractionEnabled
return rootViewController.view.isUserInteractionEnabled
}
set(value) {
rootViewController.view.userInteractionEnabled = value
rootViewController.view.isUserInteractionEnabled = 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: NSBundle?) {
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
prepareView()
}
......
......@@ -98,8 +98,8 @@ public class ToolbarController : RootController {
v.view.removeFromSuperview()
v.removeFromParentViewController()
v.view.layer.shouldRasterize = false
s.userInteractionEnabled = true
s.toolbar.userInteractionEnabled = true
s.isUserInteractionEnabled = true
s.toolbar.isUserInteractionEnabled = 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
userInteractionEnabled = false
toolbar.userInteractionEnabled = false
isUserInteractionEnabled = false
toolbar.isUserInteractionEnabled = false
delegate?.toolbarControllerWillOpenFloatingViewController?(self)
UIView.animateWithDuration(0.5,
animations: { [weak self] in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment