zionchang / emptykit Goto Github PK
View Code? Open in Web Editor NEWA lightweight, swift library for displaying emptyView whenever the view(tableView/collectionView) has no content to display, just like DZNEmptyDataSet
License: MIT License
A lightweight, swift library for displaying emptyView whenever the view(tableView/collectionView) has no content to display, just like DZNEmptyDataSet
License: MIT License
Cannot convert value of type 'AutoreleasingUnsafeMutablePointer' (aka 'AutoreleasingUnsafeMutablePointer<AnyObject.Type>') to expected argument type 'AutoreleasingUnsafeMutablePointer<AnyClass?>!' (aka 'ImplicitlyUnwrappedOptional<AutoreleasingUnsafeMutablePointer<Optional<AnyObject.Type>>>')
How to avoid cover the tableview header view ?
显示状态时候使用MJ下拉刷新造成当前视图向上偏移大约40像素
This issue is to solve your requirement, and I'm thinking code refactoring, so is there any suggestion about how to make EmptyKit
better. Thanks!
使用sectionsToIgnore虽然能够显示空样式,但是不能滚动了
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x600000284060 UIView:0x7fab1b4063a0.centerY == EmptyKit.EmptyView:0x7fab1b40a520.centerY - 44 (active)>",
"<NSLayoutConstraint:0x600000283c00 V:|-(0)-[UIView:0x7fab1b4063a0] (active, names: '|':EmptyKit.EmptyView:0x7fab1b40a520 )>",
"<NSLayoutConstraint:0x600000284380 V:[UIView:0x7fab1b4063a0]-(0)-| (active, names: '|':EmptyKit.EmptyView:0x7fab1b40a520 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000284060 UIView:0x7fab1b4063a0.centerY == EmptyKit.EmptyView:0x7fab1b40a520.centerY - 44 (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:30:11: error: use of undeclared type 'UIApplication'
extension UIApplication {
^~~~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:44:11: error: use of undeclared type 'UITableView'
extension UITableView: SelfAware {
^~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:52:11: error: use of undeclared type 'UICollectionView'
extension UICollectionView: SelfAware {
^~~~~~~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:36:29: error: use of undeclared type 'UIResponder'
override open var next: UIResponder? {
^~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:36:23: error: property does not override any property from its superclass
override open var next: UIResponder? {
~~~~~~~~ ^
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:36:29: error: use of undeclared type 'UIResponder'
override open var next: UIResponder? {
^~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:36:14: error: only classes and overridable class members can be declared 'open'; use 'public'
override open var next: UIResponder? {
^~~~
public
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:38:9: error: use of unresolved identifier 'UIApplication'
UIApplication.runOnce
^~~~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:47:9: error: use of unresolved identifier 'UITableView'
UITableView.swizzleIfNeeded
^~~~~~~~~~~
/Users/foolbear/Jobs/Reading/Reading/Utilities/EmptyKit/Swizzle.swift:55:9: error: use of unresolved identifier 'UICollectionView'
UICollectionView.swizzleIfNeeded
^~~~~~~~~~~~~~~~
runtime 类型出错
When adding a tableheaderview, the empty view is not aligned correctly, the image is overlapping the tableheaderview. Is this an issue or should this be adjusted using offset?
To reproduce in the example project:
override func viewDidLoad() { super.viewDidLoad() tableView.tableFooterView = UIView() tableView.tableHeaderView = UIView.init(frame: CGRect.init(x: 0, y: 0, width: 300, height: 150)) tableView.tableHeaderView?.backgroundColor = UIColor.black setupEmpty() }
How to customise the button? For example, add cornerRadius.
Hi,
my problem is, that the tableview does not show the empty view.
In the UI debugger i got the following information:
"height and vertical position are ambiguous for UIView"
This info is for the UIView of the EmptyKit.EmptyView.
In a another TableView everything works as expected.
我用 pod 下的最新版本里 ,没有 prepareButtonForEmpty 这个方法, 无法自定义 button
In the most recent version of EmptyKit, the empty view does not remove when reloading tableview with function tableView.reloadData(). Also forcing the update by tableView.ept.reloadData() still keeps the empty view. When the viewController is viewed again, this is solved.
This also happens in the demo project. Running on simulator and iOS 10. (Version 10.0 (SimulatorApp-726.7
)
weak var dataSource: EmptyDataSource? {
get {
return objc_getAssociatedObject(base, &datasourceKey) as? EmptyDataSource
}
set {
UITableView.swizzleIfNeeded
UICollectionView.swizzleIfNeeded
objc_setAssociatedObject(base, &datasourceKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
}
}
tableView设置了无数据图片后,第一次加载时,会闪一下、也就是reloadData后显示数据之前,先加载无数据页面。
swift4 convert have errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.