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

Love this project. Is there a way to have a gradient background / transparent feel? will attach images. #8

Closed
waelsaad opened this issue Aug 10, 2022 · 7 comments

Comments

@waelsaad
Copy link

waelsaad commented Aug 10, 2022

Great project. Thank you.

Is there a way to have one gradient background and hide the contents as you scroll up?

The third image is obviously the issue. :)

Thank you,

Wael

@f3dm76
Copy link
Collaborator

f3dm76 commented Aug 10, 2022

Hey @waelsaad, thanks for your kind words. From the top of my head, I'd try something like applying the mask to the content view or even the whole ScalingHeaderView, to cut off the top part. If that fails, please share your code, and I'll be sure to see what I can do once I have time. Have a great day!

@waelsaad
Copy link
Author

Thank you for the prompt response @f3dm76 I will give it ago and if it fails I'll send you an example project.

Have a nice day and best regards,

Wael

@waelsaad
Copy link
Author

waelsaad commented Aug 10, 2022

Hi @f3dm76

It kind of worked but perhaps because I was using the mask incorrectly it stopped the card from collapsing!.

I have attached the modified code project, also one additional but final challange I have is I have created in the code a TopBar view which is a segmented control that I'd like to position just below the card , so when the user scrolls the card will collaps and the segmented control remains below it. If you know what I mean.

ScalingHeaderScrollView-master X.zip

Thanking you in advance. :)

Kind Regards,

Wael

@waelsaad
Copy link
Author

Uploaded project file correctly.

@waelsaad
Copy link
Author

waelsaad commented Aug 10, 2022

Magic :] I just need to fix the background issue, if anyone has ideas please let me know, I will look into it tomorrow.
Simulator Screen Recording - iPhone 13 Pro Max - 2022-08-11 at 18 20 02

@waelsaad
Copy link
Author

waelsaad commented Aug 11, 2022

Updated.

@f3dm76
Copy link
Collaborator

f3dm76 commented Oct 13, 2022

Hey @waelsaad, I have kind of sort what you wanted here. It is unfortunately based on fixed insets and one more background for which you'll have to "guess" gradient colors for it to look like one with the main background. I know it's not perfect, but yeah clipping and masks just break my poor component. Hope that helps
ScalingHeaderScrollView-master.zip

@f3dm76 f3dm76 closed this as completed Oct 13, 2022
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

2 participants