//
|
// BaseTableView.swift
|
// BrokerDriver
|
//
|
// Created by 无故事王国 on 2023/4/24.
|
//
|
|
import UIKit
|
import EmptyDataSet_Swift
|
|
class BaseTableView:UITableView{
|
public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_empty"),foregroundColor:UIColor = UIColor.gray.withAlphaComponent(0.5),clouse:((EmptyDataSetView)->Void)? = nil) {
|
self.separatorStyle = .none
|
self.emptyDataSetView { (emptyDataSetView) in
|
emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : "Not data", attributes: [.font:UIFont.systemFont(ofSize: 16), .foregroundColor:foregroundColor as Any]))
|
.image(image)
|
.dataSetBackgroundColor(UIColor.white)
|
.verticalOffset(0)
|
.verticalSpace(15)
|
.shouldDisplay(true)
|
.shouldFadeIn(true)
|
.isTouchAllowed(true)
|
.isScrollAllowed(true)
|
.didTapContentView {
|
|
}
|
clouse?(emptyDataSetView)
|
}
|
}
|
}
|