Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not click the first item if some array does not have image on version 1.1.0 #9

Open
stoneyanjun opened this issue Jan 4, 2018 · 2 comments

Comments

@stoneyanjun
Copy link

Attaching the modification demo project:
With the lastest version 1.10, use the Demo project, add one line at the end of func loadImages() to remove images for first item:

private func loadImages() {
for item in items {
let imageURLs = FileManager.default.fileUrls(for: "jpeg", fileName: item)
var images: [UIImage?] = []
for url in imageURLs {
guard let data = try? Data(contentsOf: url) else { continue }
let image = UIImage(data: data)
images.append(image)
}
self.images.append(images)
}

self.images[0].removeAll()

}
gliding-collection-master 2.zip

@av0c0der
Copy link
Contributor

av0c0der commented Jan 4, 2018

@stoneyanjun can you please explain why you ever display a completely empty section?

I think it doesn't make sense to display section with no items, so I can't call this case an edge case. Maybe you'll try to provide some empty state cell?

@jimsmithm3
Copy link

I am also having an issue with this.

The reason I have empty rows is because I am using this to mirror a view of hireological folder/record filesystem. So some of the folders can have 0 records in them but I still want to show the row with no items. Then I allow the user to select the record and it brings up the detailed info for it.

Yes I can put in an empty placeholder cell but would rather it just show it with nothing if at all possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants