1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-11 05:05:23 +03:00

Fix for initializers

This commit is contained in:
Anton Marunko 2019-03-27 00:04:20 +06:00
parent 8a8b247d27
commit 1a68c1f916
6 changed files with 14 additions and 11 deletions

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="pJi-Pa-uLB">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="pJi-Pa-uLB">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>

View File

@ -1,10 +1,6 @@
// TODO: Implement better hash
extension Node: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(Unmanaged.passUnretained(self).toOpaque())
}
}
public func == (lhs: Node, rhs: Node) -> Bool {
return lhs === rhs

View File

@ -1,4 +1,4 @@
open class Drawable {
open class Drawable: NSObject {
public let visible: Bool
public let tag: [String]

View File

@ -307,4 +307,11 @@ open class Node: Drawable {
return .none
}
// MARK: - Hash
override open var hash: Int {
var hasher = Hasher()
hasher.combine(Unmanaged.passUnretained(self).toOpaque())
return hasher.finalize()
}
}

View File

@ -19,7 +19,7 @@ open class SVGView: MacawView {
self.node = node
}
override public init?(node: Node, coder aDecoder: NSCoder) {
@objc override public init?(node: Node, coder aDecoder: NSCoder) {
super.init(node: node, coder: aDecoder)
}

View File

@ -104,7 +104,7 @@ open class MacawView: MView, MGestureRecognizerDelegate {
}
#endif
public init?(node: Node, coder aDecoder: NSCoder) {
@objc public init?(node: Node, coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
initializeView()
@ -132,7 +132,7 @@ open class MacawView: MView, MGestureRecognizerDelegate {
initializeView()
}
public convenience required init?(coder aDecoder: NSCoder) {
@objc public convenience required init?(coder aDecoder: NSCoder) {
self.init(node: Group(), coder: aDecoder)
}