-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
@jianyaoang, can you review this pull request? |
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
isCameraCompatible
PhotoGalleryCameraCell