This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postfix operator ~ | |
protocol StaticallyAccessible { } | |
extension StaticallyAccessible { | |
static postfix func ~ (c: Self) -> Self.Type { | |
return type(of: c) | |
} | |
var 🌩: Self.Type { | |
return type(of: self) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
class PassThroughView: UIView { | |
override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool { | |
for subview in subviews as [UIView] { | |
if !subview.hidden && subview.alpha > 0 && subview.userInteractionEnabled && subview.pointInside(convertPoint(point, toView: subview), withEvent: event) { | |
return true | |
} | |
} |