123456789101112131415161718192021222324252627 |
- //
- // PQTabBar.swift
- // PQSpeed
- //
- // Created by SanW on 2021/1/18.
- // Copyright © 2021 BytesFlow. All rights reserved.
- //
- import UIKit
- public class PQTabBar: UITabBar {
- override open func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
- if isHidden { // 如果隐藏的话不处理事件
- return super.hitTest(point, with: event)
- }
- let view = super.hitTest(point, with: event)
- if view == nil {
- for subView in subviews {
- let myPoint = subView.convert(point, from: self)
- if subView.bounds.contains(myPoint) {
- return subView
- }
- }
- }
- return view
- }
- }
|