Comments (10)
I run your demo, but I dont see EmptyDataSetView is on top of the calendar
from emptydataset-swift.
I can see it it your screenshot. It is the transparent view above the calendar. Normally you can scroll the calendar, but the EmptyDataSetView prevents it.
Thanks for clarification.
from emptydataset-swift.
I cant see the transparent view with View UI Hierarchy. How do you know there is a transparent view above the calendar?
from emptydataset-swift.
Please click on the front UIView above Calendar. I marked it red in the image below. It is the line outside the red box. In the UIHirachy inspector you can see that it is of type EmptyDataSetView
Here another screenshots that makes it clear:
from emptydataset-swift.
OK, I see. because your collectionView is empty
@IBOutlet weak var collectionView: JTAppleCalendarView!
so will show the EmptyDataSetView.
you can use this to hidden it
collectionView.emptyDataSetView { $0.shouldDisplay(false, view: self.collectionView) }
from emptydataset-swift.
Wouldn't it be better if the collection view wich has never been associated with EmptyDataSetView would not display this view?
But temporary this fix helps a lot - thank you!
from emptydataset-swift.
It is using Method Swizzing to replace UITableview/UICollectionview.reloadData() with other implemention. The EmptyDataSetView will display whenever tableview/collectionview reloadData.So if you don't want to display the EmptyDataSetView, you have to declare it yourself.
Such implemention has both advantages and disadvantages, and maybe the problem you have is one of the disadvantages.
from emptydataset-swift.
Maybe one idea to improve it:
-
add a property to enable EmptyDataSetView on a TableView/CollectionView. Off by default.
-
let the developer decide if he wants this feature or not.
Another idea:
- only show EmptyDataSetView if the delegate is implemented
from emptydataset-swift.
Thank you for your suggestion. I will improve it.
from emptydataset-swift.
Great - thank you!
from emptydataset-swift.
Related Issues (20)
- UIRefreshControl does not work HOT 3
- Does this support a normal UIScrollView?
- EmptyDataSetSource function not get called on subclass if parent class has not implement that EmptyDataSetSource function HOT 1
- Empty data source does not show when I call deleteRows HOT 2
- pod 'EmptyDataSet-Swift', '~> 4.2.0' not available HOT 1
- Delegate and Datasource should be weak HOT 3
- Doesn't build with carthage HOT 4
- No support for Gif images HOT 1
- Calling tableView.reloadEmptyDataSet() doesn't animate
- Need help for Rx-Extension HOT 2
- 好多bug HOT 1
- Usage without confirmation to datasource and/or delegate not working.
- [LayoutConstraints]有一些警告
- Custom View For Collection View With Header HOT 2
- 自定义视图 为什么只能响应一个action呢
- emptyDataSetSource和emptyDataSetDelegate 在声明时对循环引用一点的疑问?
- 和 MJRefresh 一起使用,在无数据的时候,无法下拉 HOT 1
- verticalOffset not respected when pull to refresh HOT 1
- Show emptyDataSetView for sections
- collectionViewSwizzledReloadData Thread 1: EXC_BAD_ACCESS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emptydataset-swift.