Skip to content

Commit

Permalink
Fixed regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Usbergo committed May 16, 2017
1 parent e50228e commit 9239ab1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file not shown.
10 changes: 5 additions & 5 deletions Render/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ fileprivate var handleNewlyCreated: UInt8 = 0
public extension UIView {

public var isAnimatable: Bool {
get { return getBool(&handleAnimatable, self) }
get { return getBool(&handleAnimatable, self, true) }
set { setBool(&handleAnimatable, self, newValue) }
}

internal var hasNode: Bool {
get { return getBool(&handleHasNode, self) }
get { return getBool(&handleHasNode, self, false) }
set { setBool(&handleHasNode, self, newValue) }
}

internal var isNewlyCreated: Bool {
get { return getBool(&handleNewlyCreated, self) }
get { return getBool(&handleNewlyCreated, self, false) }
set { setBool(&handleNewlyCreated, self, newValue) }
}
}


fileprivate func getBool(_ handle: UnsafeRawPointer!, _ object: UIView) -> Bool {
return (objc_getAssociatedObject(object, handle) as? NSNumber)?.boolValue ?? true
fileprivate func getBool(_ handle: UnsafeRawPointer!, _ object: UIView, _ value: Bool) -> Bool {
return (objc_getAssociatedObject(object, handle) as? NSNumber)?.boolValue ?? value
}

fileprivate func setBool(_ handle: UnsafeRawPointer!, _ object: UIView, _ value: Bool) {
Expand Down

0 comments on commit 9239ab1

Please sign in to comment.