Coder Social home page Coder Social logo

Comments (10)

Xiaoye220 avatar Xiaoye220 commented on July 28, 2024

I run your demo, but I dont see EmptyDataSetView is on top of the calendar
1

from emptydataset-swift.

ogezue avatar ogezue commented on July 28, 2024

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.

Xiaoye220 avatar Xiaoye220 commented on July 28, 2024

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.

ogezue avatar ogezue commented on July 28, 2024

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

bildschirmfoto 2018-02-11 um 17 48 16

Here another screenshots that makes it clear:
bildschirmfoto 2018-02-11 um 17 55 16

from emptydataset-swift.

Xiaoye220 avatar Xiaoye220 commented on July 28, 2024

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.

ogezue avatar ogezue commented on July 28, 2024

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.

Xiaoye220 avatar Xiaoye220 commented on July 28, 2024

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.

ogezue avatar ogezue commented on July 28, 2024

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.

Xiaoye220 avatar Xiaoye220 commented on July 28, 2024

Thank you for your suggestion. I will improve it.

from emptydataset-swift.

ogezue avatar ogezue commented on July 28, 2024

Great - thank you!

from emptydataset-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.