1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-14 18:05:50 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/View/Container/TouchBlockingView.swift

35 lines
705 B
Swift
Raw Normal View History

2021-03-10 07:36:28 +01:00
//
// TouchBlockingView.swift
// Mastodon
//
// Created by xiaojian sun on 2021/3/10.
//
import UIKit
public class TouchBlockingView: UIView {
2021-03-10 07:36:28 +01:00
public override init(frame: CGRect) {
2021-03-10 07:36:28 +01:00
super.init(frame: frame)
_init()
}
public required init?(coder: NSCoder) {
2021-03-10 07:36:28 +01:00
super.init(coder: coder)
_init()
}
}
extension TouchBlockingView {
private func _init() {
isUserInteractionEnabled = true
}
public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
2021-03-10 07:36:28 +01:00
// Blocking responder chain by not call super
// The subviews in this view will received touch event but superview not
}
}