ReadViewSDK/Sources/RDReaderView/EPUBUI/RDEPUBReaderToolView.swift
2026-05-21 19:40:51 +08:00

33 lines
880 B
Swift

import UIKit
open class RDEPUBReaderToolView: UIView {
private let lineView = UIView()
private let lineHeight: CGFloat = 0.5
override init(frame: CGRect) {
super.init(frame: frame)
translatesAutoresizingMaskIntoConstraints = false
addSubview(lineView)
}
public required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
open override func layoutSubviews() {
super.layoutSubviews()
lineView.frame = lineFrame(in: bounds)
}
open func apply(theme: RDEPUBReaderTheme) {
backgroundColor = .white
lineView.backgroundColor = UIColor.lightGray.withAlphaComponent(0.5)
}
open func lineFrame(in bounds: CGRect) -> CGRect {
CGRect(x: 0, y: 0, width: bounds.width, height: lineHeight)
}
}
final class RDEPUBReaderTintButton: UIButton {
}