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

Photo Gallery's Empty State #8

Merged
merged 2 commits into from
Jun 28, 2017
Merged

Photo Gallery's Empty State #8

merged 2 commits into from
Jun 28, 2017

Conversation

bcylin
Copy link
Contributor

@bcylin bcylin commented Jun 26, 2017

  • Show an empty view with the camera button in the centre when the album isCameraCompatible
  • Share the camera icon layout with PhotoGalleryCameraCell

@bcylin bcylin requested a review from tflhyl June 26, 2017 13:41
@carouselljenkins
Copy link

@jianyaoang, can you review this pull request?

@carouselljenkins
Copy link

carouselljenkins commented Jun 26, 2017

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@@ -83,6 +83,20 @@ internal final class PhotoGalleryViewController: UIViewController,

private lazy var hintLabel: UILabel = PhotoGalleryHintLabel()

private var _emptyView: UIView?

private var emptyView: UIView {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be lazy var?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used _emptyView?.removeFromSuperview() to toggle the empty view so it's not created when it's not needed. It's like the manual lazy instantiation in Objective-C. Not sure if there's some other way to achieve this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, cant think of other way 👍

Copy link
Contributor

@tflhyl tflhyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bcylin bcylin merged commit 082bc67 into master Jun 28, 2017
@bcylin bcylin deleted the feature/empty-view branch June 28, 2017 15:04
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

Successfully merging this pull request may close these issues.

3 participants