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

Hide specific element from appearing at all #176

Closed
i0sa opened this issue Aug 19, 2019 · 10 comments
Closed

Hide specific element from appearing at all #176

i0sa opened this issue Aug 19, 2019 · 10 comments

Comments

@i0sa
Copy link

i0sa commented Aug 19, 2019

⚠️ Please fill out this template when filing an issue.

🙏🏼 Please check if it already exists other issue related with yours.

What did you do?

I tried skeleton, but i having one element skeletonable to OFF, makes it appear still, how about hiding it all ?

Steps to reproduce the behavior

Have an option for the element in code, to keep hidden, as long as skeletonable is active

SkeletonView Environment

SkeletonView version:
Xcode version: 10.2
Swift version: 5

@Juanpe
Copy link
Owner

Juanpe commented Aug 19, 2019

Hi @i0sa, if you want to hide an element while the skeleton is active, you can use both isHidden and alpha property.
Is it valid for you?

@i0sa
Copy link
Author

i0sa commented Aug 21, 2019

@Juanpe I still have to re-toggle this myself, I'm talking about an explicit hiding function for skeleton, that would work if i show gradient or hide skeleton, automatic

@diogot
Copy link
Contributor

diogot commented Sep 24, 2019

I have a similar issue.
Is there a delegate or some callback that we can use to be notified when the skeleton is activated and deactivated?

@stale
Copy link

stale bot commented Nov 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the given up label Nov 23, 2019
@stale stale bot closed this as completed Nov 30, 2019
@anoop4real
Copy link

I am also interested to know this

@Juanpe Juanpe reopened this Jan 13, 2020
@stale stale bot removed the given up label Jan 13, 2020
@diogot
Copy link
Contributor

diogot commented Jan 13, 2020

I opened a PR (#227) that will emits notifications when the skeleton state of a view changes.
I'm using it to hide specific views, it might not be the best way, but it works.

@Juanpe
Copy link
Owner

Juanpe commented Feb 12, 2020

PR (#227) has been merged :)

@Juanpe Juanpe closed this as completed Feb 12, 2020
@i0sa
Copy link
Author

i0sa commented Dec 30, 2020

Note that PR #339 has done exactly what i was asking for.

@Khaled-elsedek
Copy link

@i0sa did you got the solution to hide specific element

@Juanpe
Copy link
Owner

Juanpe commented Feb 2, 2021

hi @Khaled-elsedek, as you can see in the readme file, you can hide an element when the skeleton is active.

/// Hiding views when the animation starts
/// Sometimes you wanna hide some view when the animation starts, so there is a quick property that you can use to make this happen:

view.isHiddenWhenSkeletonIsActive = true  // This works only when isSkeletonable = true

It's important making skeletonable the view which you want to hide

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

No branches or pull requests

5 participants