This repository was archived by the owner on Nov 29, 2022. It is now read-only.
Open
Conversation
…no luck. Will circle back to this later...
* Removes SnapKit from EmptyDataSet * Removes weak self from UIKit animation block as it's not required
…456) * Removes SnapKit from EmptyDataSet * Removes weak self from UIKit animation block as it's not required * Adds early exit to isEmpty function to prevent unnecessary calculation * Removes SnapKit from Bento
Co-Authored-By: Eytan Schulman <me@eytan.co>
Co-Authored-By: Eytan Schulman <me@eytan.co>
eytanschulman
suggested changes
Aug 3, 2020
eytanschulman
left a comment
There was a problem hiding this comment.
In my opinion this Swift rewrite is almost ready, with some slight changes, but in a separate project, maybe DZNEmptyDataSet-Swift as it does not have full feature parity with DZNEmptyDataSet, like you noted. I think this could totally be released as a simple Swift Package, and people could start using it 😄
| } | ||
| } | ||
|
|
||
| extension ViewController: EmptyDataSetSource { |
There was a problem hiding this comment.
Does not conform to protocol EmptyDataSetSource, needs to implement:
imageTintColor(forEmptyDataSet scrollView: UIScrollView)|
|
||
| protocol EmptyDataSetProtocol { | ||
| func swizzle() -> Bool | ||
| func isEmpty() -> Bool |
There was a problem hiding this comment.
This method isEmpty() doesn't seem to be used anywhere, only implemented. Is this intended?
|
|
||
| public var isEmptyDataSetVisible: Bool { | ||
| // guard let view = emptyDataSetView else { return false } | ||
| // return !view.isHidden |
There was a problem hiding this comment.
If this is the default implementation (returning true) then this should be removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm working on a new project that requires loads of empty data set, so might as well rewrite this lib in Swift. A rewrite has been long due.
Just putting the PR out there for visibility for now. I need eyes on this code, specially for reviewing and applying good practices. I'm looking to simplify the code as much as possible, while still being easy to read and inviting for contributions.
This rewrite won't be exactly how it was proposed on #174.
This won't be:
Initial prototype is looking crisp.
