2026-01-27 15:55:28 +08:00

42 lines
1.3 KiB
Swift

//
// NREmpty.swift
// ReaderHive
//
// Created by on 2025/11/25.
//
import UIKit
import LYEmptyView
struct NREmpty {
static func nr_emptyView(image: UIImage? = UIImage(named: "empty_image_01"),
title: String? = "reader_no_data".localized,
btnTitleStr: String? = nil,
contentViewOffset: CGFloat = -100,
btnClickBlock: (() -> Void)? = nil) -> LYEmptyView {
let view = LYEmptyView.emptyActionView(with: image, titleStr: title, detailStr: nil, btnTitleStr: btnTitleStr) {
btnClickBlock?()
}
view?.titleLabFont = .font(ofSize: 16, weight: .regular)
view?.titleLabTextColor = .black.withAlphaComponent(0.25)
view?.contentViewOffset = contentViewOffset
view?.subViewMargin = 16
view?.actionBtnFont = .font(ofSize: 14, weight: .semibold)
view?.actionBtnTitleColor = .F_9710_D
view?.actionBtnHeight = 36
view?.actionBtnCornerRadius = 18
view?.actionBtnBorderWidth = 1
view?.actionBtnBorderColor = .F_9710_D
view?.actionBtnBackGroundColor = .clear
view?.actionBtnMargin = 16
view?.actionBtnHorizontalMargin = 25
return view!
}
}